View Full Version : How to create your own vBulletin-powered page! (uses vB templates)
Gary King
04 Mar 2004, 23:14
Want to create your very own vBulletin powered page which includes the header, footer, and the user permissions system as well?
Well now you can :D
Want to know how it will look? Take a look at the attached screenshot below! :)
Now includes the Who's Online modification! :)
Also, instructions included on how to create your own pages that are integrated with current vBulletin files! :D
I'm going to give you a generic page but you can easily modify the contents of the page by changing the template ;)
So here we go :)
Instructions:
Create a new file, whatever you want to call it (let's say test.php).
Open up test.php and add the following (replace TEST with whatever template you want to show):
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Be sure to change 'TEST' to the actual template name, and change 'test' to the filename. Also, change 'Test Page' to whatever you want to show in the navbar, such as 'Viewing Member Profile' (just an example).
Now create the template, called TEST with the following content:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
All done :D
Now check it out by going to test.php ;)
Who's Online Modification
Now if you want to show who is browsing this new page of yours, just open up includes/functions_online.php and find:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Below, add:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
(Be sure to change the values to your own!)
Then find:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Below add:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
All done! :D
----------------------------------
Also if you want to create your own pages 'within' current vBulletin files, do the following:
Open the file you want, and then right before the final ?> in the source code, add the following:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Replace 'xxx' with whatever you want ?do= in the query string to be (for example, replace 'xxx' with 'showprofile' so then someone would type in example.php?do=showprofile to view this template.) Then of course, change TEMPLATE_XXX to your template name, it's that simple! :D
edit by Lynne: If running 3.8.4 or above, see this post to take care of the PHP 5.3.0-related problems - http://www.vbulletin.org/forum/showpost.php?p=1871303&postcount=1171
alkatraz
05 Mar 2004, 00:20
very cool
user permissions system as well
how would you go about using that?
also, would it be hard to pass the members username/id into this page? (sorry if thats an easy question)
SVTBlackLight01
05 Mar 2004, 00:23
This is great! I assume the template standard condtionals will work here?
What's the best way to use this on a non-vb page?
dirtymerc
05 Mar 2004, 00:27
Installed, works marvelously! Thank YOU SO MUCH!
SVT. I believe that as long as global is called via the files, the conditionals will work.
Gary King
05 Mar 2004, 01:14
This is great! I assume the template standard condtionals will work here?
What's the best way to use this on a non-vb page?
I'd suggest to copy the non-vB page content and copy into a template ;)
Gary King
05 Mar 2004, 01:15
very cool
how would you go about using that?
also, would it be hard to pass the members username/id into this page? (sorry if thats an easy question)
You don't really have to worry about those, they are already in action ;)
Try it yourself - install this hack and you'll see the user/pass login part at the top :)
Also if guests are not allowed to view your forums, then they can't view these new pages you create, etc. :)
Zachery
05 Mar 2004, 02:38
Wow Gary, great thing considering this is my tutorial :P
SVTBlackLight01
05 Mar 2004, 03:00
I'd suggest to copy the non-vB page content and copy into a template ;)
What I'm saying is how can you make test.php (in this case) work outside the vBulletin directory?
Wow Gary, great thing considering this is my tutorial :PNow why doesn't that surprise me? That seems to be the norm around here. ;)
Gary King
05 Mar 2004, 03:05
Now why doesn't that surprise me? That seems to be the norm around here. ;)
Wow thanks for following me around and saying these types of things as you please ;)
Anyways, what do you mean Zachery? That I copied your tutorial..? I never even knew you released one (to add to that, I never even seen you around here before ;))
For 'tutorials' such as generic as this one, I don't think that there is really any proprietorship for anyone since it can be displayed in many forms; I haven't seen yours but I bet that mine is at least noticeably different from yours.
Wow thanks for following me around and saying these types of things as you please ;)
Then be original. 90% of the hacks you have released for vB3 have been someone else's. I mean, look at your sig. You're working on vBWar for vB3? Have you even checked with Dark_Wizard to see if he minds?
Gary King
05 Mar 2004, 03:22
Then be original. 90% of the hacks you have released for vB3 have been someone else's. I mean, look at your sig. You're working on vBWar for vB3? Have you even checked with Dark_Wizard to see if he minds?
Actually, for your information, I am working with Dark_Wizard on vBWar v3. We are in a partnership for this. Have you even taken a look at the vBWar site yet? ( http://vbwar.dpclan.us/forums/showgroups.php? )
Ok, 89%, then. Maybe you ought to put Helping with vBWar then, It is his hack.
oooh he got you on that one Boofo. ;)
Gary King
05 Mar 2004, 03:47
Ok, 89%, then. Maybe you ought to put Helping with vBWar then, It is his hack.
Well I am working on vBWar for vB3, we are practically re-building it from the ground up. Him and I are the developers of vBWar for vB3, and yes he knows that I know that he has put more time into it than I have, but mainly because I joined him only after he already had many of the things working, if not completely 100%. Anyways, this would be between me and him, and truly, it doesn't really matter what it says in my signature in my opinion, it's the final product that counts ;)
Not even close. He still couldn't do an original hack if he had to. He has to partner with someone who has a hack that IS original. You figure out the math.
Gio Takahashi
05 Mar 2004, 04:12
Come on guys, regardless that this is original or not, he still took the time to come up with this, and you gotta give him credit for that. this guy put in everything in a test page including headers and such, I found that very helpful.
SVTBlackLight01
05 Mar 2004, 04:17
So is this a hack or just a debate over who is stealing what from who? Either way, it's a vb.org staff issue, so if there is a problem click here (http://www.vbulletin.org/forum/report.php?p=482308).
I was looking for something like this and if there was already a tutorial, then I haven't seen it.
alkatraz
05 Mar 2004, 06:18
So is this a hack or just a debate over who is stealing what from who? Either way, it's a vb.org staff issue, so if there is a problem click here.
^ amen.. too many hacks/threads/hackers have been spoiled over pointless public accusations. if there's a problem, report it to the staff and leave it at that
Gary W: thx for answering my question =)
Gary King
05 Mar 2004, 13:15
^ amen.. too many hacks/threads/hackers have been spoiled over pointless public accusations. if there's a problem, report it to the staff and leave it at that
Gary W: thx for answering my question =)
No problemo :)
Not very promissing, waiting for somehting more fundamental ...
SVTBlackLight01
05 Mar 2004, 18:37
What's the best way to use this on a non-vb page?
OK. To answer my own question, on line 32, I replaced
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
with this
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
;)
surfhog
05 Mar 2004, 18:53
Sorry newbie here, can some kind sole please explain what this is suppose to do.
I have created the test.php and called it and yes looks nice:) What is the template part for and how would you best make use of this please.
Thanks
lol well hush my mouth, I see now (-0-0-) ;)
Yes nice concept and thanks
monstergamer
05 Mar 2004, 21:04
i have done some thing like this a while ago and i loe it as i use it for my affialites and rules page
Gary King
05 Mar 2004, 21:35
Not very promissing, waiting for somehting more fundamental ...
This is as basic as it gets ;)
dpakman91
05 Mar 2004, 22:04
alright, hopefully someone can help me with this:
i have some large files i want to make available to certain usergroups, but not other. the files are way too large to upload as "attachments" with vb so i would have to upload them via ftp and then just post a link in a thread...of course this means the only way to prevent people from downloading it is to prevent them from seeing the thread at all, which is not my intention.
with this new way of making a vb page, is there any way to do what i am trying to do?
any help would be great.
Gary King
06 Mar 2004, 00:42
alright, hopefully someone can help me with this:
i have some large files i want to make available to certain usergroups, but not other. the files are way too large to upload as "attachments" with vb so i would have to upload them via ftp and then just post a link in a thread...of course this means the only way to prevent people from downloading it is to prevent them from seeing the thread at all, which is not my intention.
with this new way of making a vb page, is there any way to do what i am trying to do?
any help would be great.
Try something like:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Be sure to change the path to the global.php and the usergroupid as well (currently it's 6 for admins only).
Also, save this code in a file such as download.php and then you can use the file by linking to it like www.example.com/forum/download.php?filename=something.php which will download www.examlpe.com/forum/files/something.php if the user is an administrator.
Ryan Ashbrook
06 Mar 2004, 00:55
Nice job although I think personally this would be a template mod rather than a hack, since no vBulletin files were modified.
Still good job though. ;)
The Watcher
06 Mar 2004, 01:44
This looks promising gary -> a few questions !!!
1) How can I use this outside my forums directory? Do i just use this?
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
2) How can I limit access to this page to only users in the usergroups 7, 8 and 9 ?
3) I have a php links script which I would like integrated into my forums in terms of the way it looks and the way only certain usergroups can access it. Can i use your hack to do this? If so, how I would I make a php page appear in the content area instead of the TEST template ???
Thanks again :)
Gary King
06 Mar 2004, 02:15
This looks promising gary -> a few questions !!!
1) How can I use this outside my forums directory? Do i just use this?
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
2) How can I limit access to this page to only users in the usergroups 7, 8 and 9 ?
3) I have a php links script which I would like integrated into my forums in terms of the way it looks and the way only certain usergroups can access it. Can i use your hack to do this? If so, how I would I make a php page appear in the content area instead of the TEST template ???
Thanks again :)
1) correct
2) replace $bbuserinfo[usergroupid] == 6 with $bbuserinfo[usergroupid] == 7 or $bbuserinfo[usergroupid] == 8 or $bbuserinfo[usergroupid] == 9
3) Replace eval('print_output("' . fetch_template('TEST') . '");'); with your PHP stuff.
VeoMorphine
07 Mar 2004, 15:23
Try something like:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Be sure to change the path to the global.php and the usergroupid as well (currently it's 6 for admins only).
Also, save this code in a file such as download.php and then you can use the file by linking to it like www.example.com/forum/download.php?filename=something.php which will download www.examlpe.com/forum/files/something.php if the user is an administrator.
I just want to make a correctiion to your code:
You use if($bbuserinfo[usergroupid]. On vb3, there is a new is_member_of function, that will search your primary and secondary groups for that user. Here is how the code works with it.
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
that makes it so usergroup 6 5 and 7 can download that file.
Gary King
07 Mar 2004, 15:33
I just want to make a correctiion to your code:
You use if($bbuserinfo[usergroupid]. On vb3, there is a new is_member_of function, that will search your primary and secondary groups for that user. Here is how the code works with it.
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
that makes it so usergroup 6 5 and 7 can download that file.
Ah okay thanks I never knew about that function :)
Davey-UK
07 Mar 2004, 15:55
I like the idea of this, but looking around the Mod request pages, alot of people are looking for the last posts etc also to be displayed on a non vb page. I remember using something called API over at invision which was great. All you did was put includes in the page where you wanted specific things that were pulled from your board via templates which you could modify. Anyone know if something like this is going to be made? Gary W?
attroll
08 Mar 2004, 04:52
I have been using this mod since VB 2. I see some changes. I don't care who wrote it. But I have two request.
1. I would like the new navbar that Beta 3 uses. Below the header in each page that I create.
2. I would like to see an icon or something on each page for a printable version.
SVTBlackLight01
08 Mar 2004, 06:49
This looks promising gary -> a few questions !!!
1) How can I use this outside my forums directory? Do i just use this?
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
That works, but I discovered that you have to have the full URL for vbulletin_global.js and vbulletin_menu.js in the headinclude template. Otherwise the drop-down menus in the navbar will not work outside of the forum directory.
Osterling
08 Mar 2004, 10:56
i hope some one answers my question here..
on the second part you say to make a template.. now what should i save the extention of my template..
for your ur example: test < should it have an exention be?
i am really new to php and all of it, so if you could please explain this 2 me, i'd be grateful
Gary King
08 Mar 2004, 13:08
i hope some one answers my question here..
on the second part you say to make a template.. now what should i save the extention of my template..
for your ur example: test < should it have an exention be?
i am really new to php and all of it, so if you could please explain this 2 me, i'd be grateful
Templates don't have extensions :)
Osterling
08 Mar 2004, 13:09
so if i create it in notepad and save it as test that will work?
Gary King
08 Mar 2004, 13:09
I have been using this mod since VB 2. I see some changes. I don't care who wrote it. But I have two request.
1. I would like the new navbar that Beta 3 uses. Below the header in each page that I create.
2. I would like to see an icon or something on each page for a printable version.
1. already is there
attroll
08 Mar 2004, 15:17
1. already is there
Gary W
If it is already there then why can't I see it? I see no navbar or anywhere where there is an option for a printable version. I did one of your mods and it did not show up. Here is the mod I did:
http://www.whiteblaze.net/forum/2004.php?
Gary King
08 Mar 2004, 20:39
so if i create it in notepad and save it as test that will work?
Nope you have to make a new template by using the Template Manager in admin cp :)
Gary King
08 Mar 2004, 20:41
Gary W
If it is already there then why can't I see it? I see no navbar or anywhere where there is an option for a printable version. I did one of your mods and it did not show up. Here is the mod I did:
http://www.whiteblaze.net/forum/2004.php?
*sigh* please don't bash hacks unless they truly don't work and it wasn't the installer's fault :)
Take a look at this screenshot, that's how it should look: http://www.vbulletin.org/forum/attachment.php?attachmentid=17205
Also, I never said I had included a printable version now did I? :)
Who's Online Modification
Now if you want to show who is browsing this new page of yours, just open up online.php and find:
You might want to change the file they should edit to /includes/functions_online.php instead of online.php. ;)
Gary King
09 Mar 2004, 01:05
You might want to change the file they should edit to /includes/functions_online.php instead of online.php. ;)
Fixed now.
attroll
09 Mar 2004, 03:56
Bump
Osterling
09 Mar 2004, 17:13
greak hack got it working! only question.. is there a way to make it so when some one searches the forum, the pages i made are searched too?
Zachariah
09 Mar 2004, 17:40
I was trying to add this to the php file and show up in the "TEST" template.
Can anyone could give me a hand on how to make it VB3 friendly. :cross-eyed:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Gary King
09 Mar 2004, 20:53
greak hack got it working! only question.. is there a way to make it so when some one searches the forum, the pages i made are searched too?
No because search function only searches threads and posts anyways.
Gary King
09 Mar 2004, 20:55
I was trying to add this to the php file and show up in the "TEST" template.
Can anyone could give me a hand on how to make it VB3 friendly. :cross-eyed:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
PHP code goes in the file before outputting the TEST template, and HTML goes into the temlpate :)
Very nice job on this, I finally got around to adding all the miscellaneous forum policies and a few subpages and this was just what the doctor ordered to accomplish it!
Thanks a lot!
Gary, looks like a great mod... i have a question though
Would it be possible to call an external html page to be included within instead of using templates?
Is there anything like this for vB2.3.X?
Gary King
09 Mar 2004, 23:03
Gary, looks like a great mod... i have a question though
Would it be possible to call an external html page to be included within instead of using templates?
Well then there wouldn't be a header or footer, so no point in using this mod then :) I'd suggest copying the HTML and placing into the body of my template :)
Is there anything like this for vB2.3.X?
Is this like Logicians Template hack?
Alright... vB newbie here, and this question is so basic, it almost makes me feel dirty...
Be sure to change 'TEST' to the actual template name, and change 'test' to the filename. Also, change 'Test Page' to whatever you want to show in the navbar, such as 'Viewing Member Profile' (just an example).
Now create the template, called TEST with the following content:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
All done :D
Now check it out by going to test.php ;)
Here's my (oh so humble :o ) question... I'm looking everywhere, and I'm very confused about templates, and the Template Manager. First of all, is the Template Manager the same thing as the Style Manager? And regardless of that, the above code doesn't look like somethign that would be dealt with in the Style Manager anyway... at least not anywhere I can find. Do I need to save this as a template file in my code source (can't find a place it would make sense for it to go), and if not, where would I drop it in in the Style Manager?
Gary King
12 Mar 2004, 23:11
Alright... vB newbie here, and this question is so basic, it almost makes me feel dirty...
Here's my (oh so humble :o ) question... I'm looking everywhere, and I'm very confused about templates, and the Template Manager. First of all, is the Template Manager the same thing as the Style Manager? And regardless of that, the above code doesn't look like somethign that would be dealt with in the Style Manager anyway... at least not anywhere I can find. Do I need to save this as a template file in my code source (can't find a place it would make sense for it to go), and if not, where would I drop it in in the Style Manager?
Style Manager manages several styles. Each style contains hundreds of templates :) Let me know if that doesn't help, but should at least set you off on the right foot!
Ravenheart
12 Mar 2004, 23:24
Style Manager > Click the drop down box > Edit templates :)
Is this like Logicians Template hack?
umm Gary, would you prefer me to PM these questions to you?
Zachery
13 Mar 2004, 06:49
umm Gary, would you prefer me to PM these questions to you?
im suprised this thread has made it to 5 pages, this isnt even a hack... if you would like to learn you could try a link in my sig, also this could have bee much better done with a call to GENERIC_SHELL template using a second template ;)
Who is online system new variables should be in ACP MySQL DB, not the PHP files, I think ... for quicker eiditing ...
Zachery
13 Mar 2004, 08:27
Who is online system new variables should be in ACP MySQL DB, not the PHP files, I think ... for quicker eiditing ...
Actually you need to add a few new lines of code to make whos online recgonize where you are :)
Gary King
13 Mar 2004, 14:58
umm Gary, would you prefer me to PM these questions to you?
Closest thing I can think of is this: http://www.vbulletin.org/forum/showthread.php?s=&threadid=36600
Kakarot
15 Mar 2004, 02:40
How would you get a straight HTML, non-vbulletin related page to show up on "Who's Online" on another forum (on the same server of course).
I'm assuming you must reference it to a PHP snippet of code that records Who's Online, but how would I go about doing it?
Gary King
15 Mar 2004, 03:49
How would you get a straight HTML, non-vbulletin related page to show up on "Who's Online" on another forum (on the same server of course).
I'm assuming you must reference it to a PHP snippet of code that records Who's Online, but how would I go about doing it?
Just type in <?php require_once('global.php'); ?> at the top of the file (global.php being the one in forum so change accordingly.)
attroll
15 Mar 2004, 05:21
*sigh* please don't bash hacks unless they truly don't work and it wasn't the installer's fault :)
Take a look at this screenshot, that's how it should look: http://www.vbulletin.org/forum/attachment.php?attachmentid=17205
Also, I never said I had included a printable version now did I? :)
Gary W
I am sorry if it looked like I was bashing the hack. That was the furthest thing from my mind. I just can not get the navbar thing to work. I followed your instructions and paisted the php code into the correct files. But I can not get the navbar to work.
You can look at my file buy going to this link. There is no navbar. Could you give me some advice?
http://www.whiteblaze.net/forum/test.php
I guess there was a misunderstanding about the printable version because in the previous post I asked two questions and your response was "already is there". So I asumed that was the answer to both questions. So I guess that was my bust?
http://www.vbulletin.org/forum/showpost.php?p=483409&postcount=40
attroll
15 Mar 2004, 05:29
Gary W
I found out what happened. It was my fault that the navbar was not showing up. I deleted ths $navbar in the template by mistake. I am sorry about the misunderstanding.
But I would still like to see a option for a prinatble version added if it is possible.
Marulatree
15 Mar 2004, 16:03
I just get a blank page;
I have put the test.php file in my forum root e.g. /forum/test.php
And I have created the template...
All I get is a blank page...???
Gary King
15 Mar 2004, 16:41
I just get a blank page;
I have put the test.php file in my forum root e.g. /forum/test.php
And I have created the template...
All I get is a blank page...???
What's the template name? Use UPPERCASE not lowercase.
phenomenon
20 Mar 2004, 01:45
I'm intrigued by this. I keep coming back to it, wondering if this is something that could be combined with Coppermine or with 4images to get the gallery integrated with the forum. I'm currently running 4images; it allows me to login etc. but logs me out as soon as someone else looks at the forum or the gallery. Drives me nuts. I'd like it to have the navbar across the top, but replace the search functionality with the gallery search (which I've done already once before I scrapped and started over -- basically built a search that looks like vbulletins but calls 4images code)
That gallery is installed into a different directory, but I see you've got the code here for the diff directory.
There is a hack that unfortunately no one is paying attention to anymore here that linked the user login/cp of vb3 to the 4images... so now what I'm curious about is getting basically this to work the other way around -- make the login/etc. work with the gallery.
Hmm... I suppose if I were to copy all the 4images html into these templates it may work.
SilverDawn
20 Mar 2004, 20:43
great! I have been looking to get my custom pages to display correctly on who's online!
Thanks!
AshAbed
21 Mar 2004, 01:01
is it possible to make it so test.php?page=xxx works? thanks
Gary King
21 Mar 2004, 01:10
is it possible to make it so test.php?page=xxx works? thanks
Yes it's possible but it would be harder to explain and to make it work properly; why not just create a new file? :)
Grendel
21 Mar 2004, 19:00
I try to put the "whats-going-on"-content of the forumhome-template into a custom template. Works fine - besides the "calender events". Is there any way to put the events on an "vBulletin-powered page"?
Greetings
Grendel
Gary King
21 Mar 2004, 19:20
You'd have to copy the code in the file to produce the results for that; easiest thing to do would be to copy all of the contents of the index.php but remove the print_output() line.
Grendel
21 Mar 2004, 19:33
That's what I had done.
It shows the statistics, online-users and birthdays. But the events are not shown :(.
Grendel
21 Mar 2004, 20:37
Is there any chance to get the "Quick-Links" of the navbar running on "vBulletin-powered pages"? That would be nice.
Sorry, my fault. forgot the $navbar.
But the other problem exists nevertheless. ;)
Gary King
22 Mar 2004, 00:58
Is there any chance to get the "Quick-Links" of the navbar running on "vBulletin-powered pages"? That would be nice.
Sorry, my fault. forgot the $navbar.
But the other problem exists nevertheless. ;)
Well I haven't looked into how the code creates the events data, but I suppose it would require more than index.php then. I will look into it when I have time, or maybe someone else could give it a go :)
AshAbed
22 Mar 2004, 01:02
Yes it's possible but it would be harder to explain and to make it work properly; why not just create a new file? :)
I was using vBadvanced and had 100+ pages running through it, they're all saved as index_(pagename), I was hoping to be able to do this without making a page for each and keeping them named as index_pagename
Gary King
22 Mar 2004, 02:03
Put the following, probably best place would be at the very end right before the ?>
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
AshAbed
22 Mar 2004, 02:42
http://www.maddpc.com/~ashraf/index.php
the index page works fine, I added the extra code you put to the end of index.php but when I put something like http://www.maddpc.com/~ashraf/index.php?page=psdmain I'm not brought to the template index_psdmain, how would this be done?
Grendel
22 Mar 2004, 10:52
Well I haven't looked into how the code creates the events data, but I suppose it would require more than index.php then. I will look into it when I have time, or maybe someone else could give it a go :)
That would be great. I'll take a look as well, but I tried various things yesterday and none was working.
SVTBlackLight01
23 Mar 2004, 04:35
http://www.maddpc.com/~ashraf/index.php
the index page works fine, I added the extra code you put to the end of index.php but when I put something like http://www.maddpc.com/~ashraf/index.php?page=psdmain I'm not brought to the template index_psdmain, how would this be done?
Have you gotten this to work? This could be useful for me as well.
AshAbed
23 Mar 2004, 12:14
Have you gotten this to work? This could be useful for me as well.
unfortunatley I haven't, I'll work on it and tell you how it goes
Osterling
23 Mar 2004, 12:30
is tehre a way to have it seach pages that are not off the forum?
Gary King
23 Mar 2004, 15:14
Have you gotten this to work? This could be useful for me as well.
I've placed instructions in the first post a few days ago :)
Silverstangs
23 Mar 2004, 19:14
Thank you Gary W for the tutorial, I needed that!
Silver
SVTBlackLight01
23 Mar 2004, 19:54
I've placed instructions in the first post a few days ago :)
OK. I have it working now. Thanks.
Gary King
23 Mar 2004, 20:52
No problem glad it worked :)
AshAbed
23 Mar 2004, 22:12
sorry to be a hassle, but can you please tell me what I'm supposed to do here?
my templates are named index_fonts, index_psds...etc like that, what would I change this code to for it to work correctly?
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
thanks alot
Gary King
24 Mar 2004, 01:13
sorry to be a hassle, but can you please tell me what I'm supposed to do here?
my templates are named index_fonts, index_psds...etc like that, what would I change this code to for it to work correctly?
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
thanks alot
Change TEMPLATE_XXX to index_fonts, etc.
AshAbed
24 Mar 2004, 01:19
ok.. sorry about this, but http://www.maddpc.com/~ashraf/index.php? is the page, I added
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
and I don't see index_fonts template when I go to
http://www.maddpc.com/~ashraf/index.php?do=fonts
or
http://www.maddpc.com/~ashraf/index.php?do=index_fonts
thanks
I think you must try this code:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Gary King
24 Mar 2004, 03:15
ok.. sorry about this, but http://www.maddpc.com/~ashraf/index.php? is the page, I added
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
and I don't see index_fonts template when I go to
http://www.maddpc.com/~ashraf/index.php?do=fonts
or
http://www.maddpc.com/~ashraf/index.php?do=index_fonts
thanks
If you use that code, then go to ?do=xxx
Grendel
24 Mar 2004, 13:43
I try to put the "whats-going-on"-content of the forumhome-template into a custom template. Works fine - besides the "calender events". Is there any way to put the events on an "vBulletin-powered page"?Even if I'm the only one who is interested in this problem I post my solution anyway:
If the events should show up:
define('THIS_SCRIPT', 'test'); (where test is the name of the nonvb-page)
should be
define('THIS_SCRIPT', 'index');
Ok i am having one hell of an issue, I made a index page for a site i am building but when your not logged into the forum the homepage doesnt show up. This page is out side vb and in the home directory. any help would be appreciated.
EDIT: i put it back into vb and still logged out user cant see it how do i give them permissions to veiw this page?
Marulatree
26 Mar 2004, 00:37
linux server files are case sensitive...
it's all lowercase /forum/test.php - still give me a blank page...
What's the template name? Use UPPERCASE not lowercase.
Marulatree
26 Mar 2004, 00:40
got it!!!! test at the bottom of test.php is uppercase there your template needs to be "TEST" uppercase
AutomatikStudio
26 Mar 2004, 03:14
Alright gary...thanks for the tips thus far. He's what I'm trying to do. I'm trying to create an article system of sorts. My database table will have the following fields: Author, Date, Article, Title, and ID. Now, what I'd like to do is have something like:
articles.php?do=viewarticles&artid=4
And that would call the article in the database with the ID of 4. At any rate, how would I do that without having to make a new template for every article.
SVTBlackLight01
26 Mar 2004, 03:49
AutomatikStudio,
Just a suggestion. It may be easier to use a variation of one of the portal hacks.
Gary King
26 Mar 2004, 04:00
Alright gary...thanks for the tips thus far. He's what I'm trying to do. I'm trying to create an article system of sorts. My database table will have the following fields: Author, Date, Article, Title, and ID. Now, what I'd like to do is have something like:
articles.php?do=viewarticles&artid=4
And that would call the article in the database with the ID of 4. At any rate, how would I do that without having to make a new template for every article.
Basically just use a generic 'shell' template which has generic stuff that all the pages will have. Then just use variables in the templates, I'm sure you can go from there :)
can u make vb code work with this ?
otherwise this is like HTML pages i guess...gotta use HTML tags.
The Wise One
27 Mar 2004, 03:10
is it possible to get the member age (if specified by the user in in his options) to show on the page...and is it possible to get the contact column from memberlist.php to work on this custom page? if so...how?
SVTBlackLight01
27 Mar 2004, 04:22
I have also been wondering if it is possible to include info for a specific user on the page.
AutomatikStudio
28 Mar 2004, 05:11
How would I add the title of the page in to the <title> tags?
SVTBlackLight01
28 Mar 2004, 05:59
This is what I am doing to make it a little more automated.
Between the title tags, use
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
This will display what ever you use for you navbits here
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
in the title.
See here:
http://www.modernengineuity.com/specs/ford_gt.html
AutomatikStudio
28 Mar 2004, 06:23
Where can I find the <title> tags to edit? I seriously feel like I've looked everywhere..I'm sure they're right under my nose.
SVTBlackLight01
28 Mar 2004, 06:32
It's in the template.
AutomatikStudio
28 Mar 2004, 06:38
Yeah..that's what I'm saying...I've looked through just about every template. Which specific template did you edit?
SVTBlackLight01
28 Mar 2004, 06:45
If you use the first post as an example, the template would be called TEST.
It should look something like this
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
AutomatikStudio
28 Mar 2004, 06:46
Doh...I'm an idiot.
Okay, I created the php files and uploaded them, and made the templates and named them in uppercase. But when I enter the addy in my browser, I get this:
Parse error: parse error, expecting `')'' in /home/pkrwud/public_html/vbulletin/decals.php on line 13
BTW, I am rather clueless when it comes to this stuff, but I try.
also, "decals.php" is the "test" file.
Enforcerman
28 Mar 2004, 08:24
Ok. I read all 8 pages so far and i havent seen this question asked. So, I am going to go for it. Lets say that you have two different styles for a forum and you want to specific exactly which style you want a page to display. Can you think of any code that can be included that will load a specific style.
Oh yeah. I dont want to add the styleid variable to the URL either. I want this to be hidden in the php page.
FASherman
28 Mar 2004, 13:28
This looks promising gary -> a few questions !!!
1) How can I use this outside my forums directory? Do i just use this?
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
1) correct
I believe this is incorrect. If yo do it this way, you will display a non-functioning navbar. The pop-up menus will not work. I don't know why, and I don't know how to fix it, but I do know if you create test.php in your forum root dir and the TEST template exactly as given in the first post, it works.
Take that same script and more it to another directory and it breaks on global.php. Add the chdir as above just before your require statement and you will have a non-functioning navbar. No pulldown menus.
Any ideas on how this is resolved?
Well, I just tried all over again from scratch, and did it exactly the way I read it, and this time received this error:
Parse error: parse error, expecting `')'' in /home/pkrwud/public_html/vbulletin/test.php on line 23
What does this mean? On line 23, is 'TEST', the name of the TEST template I made.
Anyone?
AutomatikStudio
28 Mar 2004, 14:49
What is your WHOLE line 23? Copy and paste it here.
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Okay, I just copied it straight out of the control panel, and those "+" marks weren't there. I have no idea where they came from, but when I pasted here, they showed up.
Fascinating. For some reason, my copy of BBEdit is placing characters in those places in my files when I save them. Looks like problem solved. Thank you.
One question, though; There's no link in the NavBar for the page. Where in the NavBar should it be?
Gary King
28 Mar 2004, 16:07
I believe this is incorrect. If yo do it this way, you will display a non-functioning navbar. The pop-up menus will not work. I don't know why, and I don't know how to fix it, but I do know if you create test.php in your forum root dir and the TEST template exactly as given in the first post, it works.
Take that same script and more it to another directory and it breaks on global.php. Add the chdir as above just before your require statement and you will have a non-functioning navbar. No pulldown menus.
Any ideas on how this is resolved?
Just chdir() back to the vBulletin directory.
SVTBlackLight01
28 Mar 2004, 17:13
I believe this is incorrect. If yo do it this way, you will display a non-functioning navbar. The pop-up menus will not work. I don't know why, and I don't know how to fix it, but I do know if you create test.php in your forum root dir and the TEST template exactly as given in the first post, it works.
Take that same script and more it to another directory and it breaks on global.php. Add the chdir as above just before your require statement and you will have a non-functioning navbar. No pulldown menus.
Any ideas on how this is resolved?
Check out this post.
http://www.vbulletin.org/forum/showpost.php?p=483363&postcount=36
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
also needs to be added to the beginning of all the relative linnks in the navbar and footer templates.
I have many operating pages outside the forums directory using this hack.
AutomatikStudio
28 Mar 2004, 17:36
One question, though; There's no link in the NavBar for the page. Where in the NavBar should it be?You have to manually code in what you want in the navbar. Just go to the navbar template and type it in and link it to your custom page.
FASherman
28 Mar 2004, 19:19
Check out this post.
http://www.vbulletin.org/forum/showpost.php?p=483363&postcount=36
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
also needs to be added to the beginning of all the relative linnks in the navbar and footer templates.
I have many operating pages outside the forums directory using this hack.
I knew I could count on a fellow Texan for help.
SVTBlackLight01
28 Mar 2004, 20:12
Some of us need all the help we can get. :D
attroll
29 Mar 2004, 17:51
I have removed the following code from the PHP file and it still works. Could you tell me what the purpose of this code is and what it does?
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
OK, read through everything - I think. When I run test.php located in my development forum dir, it comes out correct
When I try to run test.php outside of my dev forum, I get this:
http://www.rimfirecentral.com/test.php
I have modified test.php with:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
I'll keep playing with it until someone responds, but any assistance would be appreciated.
Thanks,
Dan
raynett
29 Mar 2004, 19:41
I had the same style problem on my page outside of the forum. Copying the clientscript and images folders in the directory the test.php page resides seemed to correct that.
The problem I can't figure out though... the links in the navbar and footer portion of the test page do not link properly if the page is outside of the forum folder. The address is missing the forum portion of the URL. Example: link leads to http://www.yourdomain.com/register.php when it should lead to http://www.yourdomain.com/forum/register.php.
I had the same style problem on my page outside of the forum. Copying the clientscript and images folders in the directory the test.php page resides seemed to correct that.
The problem I can't figure out though... the links in the navbar and footer portion of the test page do not link properly if the page is outside of the forum folder. The address is missing the forum portion of the URL. Example: link leads to http://www.yourdomain.com/register.php when it should lead to http://www.yourdomain.com/forum/register.php.
$vboptions[homeurl]/
"also needs to be added to the beginning of all the relative links in the navbar and footer templates."
If I have to copy any script out there, I'm not even going to mess with it. I did have use for it if I could get it to work though. I'm also going to use it within my forum dir for two or three pages that I need too. Will start working on those tonight!
Gary King
29 Mar 2004, 21:09
I have removed the following code from the PHP file and it still works. Could you tell me what the purpose of this code is and what it does?
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
They save you queries; yes you can remove them, but they are there as 'fillers' so you can put in your own values if you ever need to.
They are for phrasegroups, and also for template-cache; meaning if you put your template names there then you will save 1 extra query.
attroll
30 Mar 2004, 05:53
They save you queries; yes you can remove them, but they are there as 'fillers' so you can put in your own values if you ever need to.
They are for phrasegroups, and also for template-cache; meaning if you put your template names there then you will save 1 extra query.
The reason I asked this is because shortly after I install this mod and replaced it with the other version I was using I started getting MYSQL errors. I narrowed down where the errors were coming from. They were coming from to much memory being used. So I removed this mod and put the other version back in and now I have not had any problem any MYSQL errors. I don't know if this was just coindence or not. But I like this version of the mod here and would like to reinstall it. But I am afraid to put it back in because the errors might come back. The other mod that I am using now it pretty much identical to this mod except for the lines I asked about.
Would those lines cause more memory usage?
Gary King
30 Mar 2004, 14:19
Those lines would cause less memory usage.
attroll
30 Mar 2004, 14:50
Those lines would cause less memory usage.
I will switch back over and reinstall it again later this week and see if the errors come back. I hope they do not. I like this version of the hack. I will keep you posted.
The Wise One
01 Apr 2004, 02:31
is it possible to get the member age (if specified by the user in in his options) to show on the page...and is it possible to get the contact column from memberlist.php to work on this custom page? if so...how?
anyone have any thoughts on this?
da prez
01 Apr 2004, 05:13
i am wondering if i can use $post[musername] or other varibles in the text.
i have tried every combination i can think of with no luck.
da prez
01 Apr 2004, 19:17
nevermind i got it.
well most of it.
i needed the following : $bbuserinfo[username]
ogden2k
04 Apr 2004, 23:13
Great hack!
SVTBlackLight01
05 Apr 2004, 00:18
is it possible to get the member age (if specified by the user in in his options) to show on the page...and is it possible to get the contact column from memberlist.php to work on this custom page? if so...how?
Is this for the person viewing the page or for making a page about a specific member?
To display the info about whoever is viewing the page (if they're a member) shouldn't be too hard.
joeychgo
05 Apr 2004, 04:01
How could I stick coppermine into this page??
contramontanum
06 Apr 2004, 13:45
I must be doing something wrong. I've created test.php, renamed to privacy.php, changed all occurences of "test" to "privacy", uploaded to root folder and created template "privacy" in ACP, but all I get when going to myforums.org/privacy.php (http://www.loudmouthforums.org/privacy.php) is a blank page. I'm befuddled...
attroll
06 Apr 2004, 14:25
I must be doing something wrong. I've created test.php, renamed to privacy.php, changed all occurences of "test" to "privacy", uploaded to root folder and created template "privacy" in ACP, but all I get when going to myforums.org/privacy.php (http://www.loudmouthforums.org/privacy.php) is a blank page. I'm befuddled...
Did you create a template in you admincp titled "privacy" and put your own data in it? It sounds like you forgot to do that.
CdaKnight
07 Apr 2004, 01:37
I have a question, and everybody is forewarned that I'm a bit of a hacking n00b.
Alrighty, taken care of that.
I'm interesting in making my site run off of vB templates, etc to make it all look continuous (same footer, etc). However, I know you can't run php code in most of the templates (php_start, and end excluded from that), but a large section of my site uses php and mySQL to retrieve information.
Am I correct in saying that if I put the php code in the actual page (test.php for example), that in my template "test", I can call the variables that are in test.php? (Like if I have the array $comicinfo, and I need $comicinfo[date], or even just "$date" that it would display?)
Thanks in advance
Chris
Bro_Joey_Gowdy
08 Apr 2004, 15:47
/me clicks install
attroll
08 Apr 2004, 15:53
I was wondering. I don't see where this has been asked before or not. But can you use this hack and put another site withing the template? What I want to do is have my template and have another URL upen within the template so that my header is still on top and the other site can be viewed.
Bryan Ex
08 Apr 2004, 19:41
What's the template name? Use UPPERCASE not lowercase.
Thank you! That was driving me nuts as well.
BarBeQue
09 Apr 2004, 12:29
This was just what i needed, thanks!
Got a question though, not really a hackproblem but i'm gonna ask it anyway ;)
I have a html page that i wanted to display inside the forum, and using this hack could do that perfectly, by just copying that html page inside the template.
But, the html page is generated automatically each day so hardcopying it into the template isn't an option.
Is there a way to grab the html contents and to display it inside the template?
It kinda works by using an iframe in the template, but iframes need height dimensions and the generated page varies in height (and a scrollbar for the iframe looks very ugly).
Any idea on how to do this? or how to set the height of the iframe to be variable?
Or alternatively, is there a way to do it the other way around, add the header/navbar/footer to the html page (everthough it's generated i can determine what fixed components should be in this html page) and maybe shange the html page in an php page?
Oh btw...
/me clicks install :D
wolfgang2
09 Apr 2004, 13:41
very nice:)
installed and thank You!
[FG]Omega
15 Apr 2004, 21:28
fantastic. thank you very much, Gary :)
Have a question for you all???
I have added exactly what you have shown on the 1st page in order for this hack to work, but I'm running into a problem when this page is called up like this:
http://www.gspotracing.com/4x4rigs/showphoto.php/photo/75/sort/1/size/medium/cat/516/page/
I added your hack to the showphoto.php page and it only works in the whos online area when the page is being visited by:
This link: http://www.gspotracing.com/4x4rigs/showphoto.php?photo=61
And by a direct link to the page, but not by the 1st link I have given you above...
PLEASE HELP ME.. I REALLY NEED THIS INTEGRATED HACK... :(
SVTBlackLight01
16 Apr 2004, 05:27
You must be a registered user to view images!
To register click on the REGISTER button in the menu above.
You must be a registered user to view images!
To register click on the REGISTER button in the menu above.
Sorry I have this option so new members will register in order to view the images the forum has to offer. Non-the-less, I'm still having the same problem.. And this doesn't effect the coding problem I'm running into, does it???
I dont know what I'm doing wrong here, please can someone help me on this. I have the following file being called: "referals.php" with the .php scripting in it and one template being used as well called: "reflist"... Any help would be appreciated, no matter what I do, nothing is outputed from the database. I see the columns correctly, but no usernames or number of referrals, I know there are many members with referrals at this time also. Maybe it's just something messed up in my coding.. PLEASE HELP...
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
I dont know what I'm doing wrong here, please can someone help me on this. I have the following file being called: "referals.php" with the .php scripting in it and one template being used as well called: "reflist"... Any help would be appreciated, no matter what I do, nothing is outputed from the database. I see the columns correctly, but no usernames or number of referrals, I know there are many members with referrals at this time also. Maybe it's just something messed up in my coding.. PLEASE HELP...
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
SO no one can help me here... WOW.. thanks. :(
PuntoPower
23 Apr 2004, 18:43
hi, i installed this and it worked all ok.
wat im trying to achieve is have a phpMyChat section in it inbetween the header and the footer.
how do i go about this? is there code that can call the file for the chat
www.mywebsite.com/chat/chat/index.php3
that places it in the center. im only have basic html. can i create a table and have the page inside that?
plz help
attroll
24 Apr 2004, 17:15
SO no one can help me here... WOW.. thanks. :(
I have found that you don't always get replies to any questions you ask here. I wish the support were better. But this is a hack so I guess we should expect that.
You say you have done exactly as shown in the first page of this post. But you added to the PHP file. The way I understand this hack is that is was created so you can use the template that you create to put all your information in that you want displayed.
I looked at your PHP file and you added to that. I doin think it was intended for this to be done. That is why I think no-one has replied to you on this. You have added the following code in you PHP file:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Cold Steel
27 Apr 2004, 03:17
$vboptions[bburl] works better than $vboptions[homeurl] for those who don't have vB installed in the root directory.
Rick Sample
29 Apr 2004, 05:22
I'm lost can someone try to fill me in? LOL :)
Ok all I need to do is open up notepad and copy the first set of text in their right? I don't need to add any other <body> tags or anything?
When I want to add stuff I just edit the template or do I edit the so called test file?
Thanks for helping a NewB :)
Cold Steel
29 Apr 2004, 21:18
Save the first set of text as a .php file in Notepad. Upload to your server.
When you want to add stuff edit the template. You don't need to edit the PHP file again.
I've been playing with this and it's a pretty neat thing :). Cheers for putting this info together. I do a quick question I'm hoping someone can point me in the right direction on, however.
I'm working on being able to being able to display a list of agreements all from one primary page using the do= thing. So I have agreement.php setup like is described in the tutorial and instead of
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
...at the end of the file, I have instead added something like:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
This works fine except the templates for AGREEMENT, agree_standard, and agree_special all basically contain the same code except for the body of the agreement itself. Meaning, it sounds to me like each template contains a lot of redundant code, e.g.
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
etc.
How do I set it up so the AGREEMENT template contains this primary structure while child templates like agree_standard aren't forced to repeat it within their own structure, and just contain the HTML I need for that page's 'do' statement?
I'm on the verge of a nervous breakdown here! lol
I have a nice page working, but I need the "what's going on?" info at the bottom. I've been trying to do this for 4 hours now. I think I've tried everything I'm capable of with no luck. I took the 'What's going on?' box and added it to the template, I then took the what's going on php info and added that to my php file for this hack. I got a few items to work but not all of them. Can someone please help me do this? Thanks
SVTBlackLight01
30 Apr 2004, 19:30
welo,
Put the HTML you need for that page's 'do' statement in avariable like this:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Then add $whatever in your AGREEMENT template where you want the 'do' stuff to appear.
That's exactly what I was trying to do. Thanks man. I've been switching off between working on this and writing all kinds of legal crap for the actual agreements, and just couldn't see it. Sure makes sense now :). Thanks again.
I'll donate $15 to someone's paypal account if they can help me with my issue in post #163 , I'm desperate!
I need the "what's going on?" info at the bottom.
I don't think anyone knows what you mean. I know I sure don't have a "What's going on" something-or-other anywhere on my VB.
Okay, I see what you mean. Sorry about that. I'm running into the same issue with trying to add in "Currently Active Users Viewing..."
Mr. HillBilly
30 Apr 2004, 23:42
Here guys, try this.
Edit the lines at the top of the file so they look like this, be sure to include your own changes if you had made any.
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Add the lines below to your script near the bottom.
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Save your file and upload it.
Now for the template edits,
place the following code anywhere you want the Whos online to show.
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Mr. Hillbilly, thanks for the help so far! Still not working though. I'm not sure what I'm doing wrong. I have attachment my php code and template code. The following code shows the what's going on box as:
APUG Forums Statistics
Threads: , Posts: , Members:
Welcome to our newest member,
It only shows a few stats and they are blank. Hope you can help, thanks again!
Mr. HillBilly
01 May 2004, 05:48
Forgot to add a couple of lines, this one should work.
Forgot to add a couple of lines, this one should work.
updated the new php file, cleared cache, went back to the page and still no change, looks the same :( seems like it should work, weird
Synicide
01 May 2004, 20:38
Well, here's a question for you guys. :D
I'd be forever grateful if somebody could get this to even semi-work.
I've chosen to use this method of creating pages since the thought of customizing a portal to get rid of all the blocks is beyond me. Pretty much all I need to do what a lot of the portals do, display threads from a "news" forum with simple comment links.
That's it, I just need to know how to get the title, date, author and comment links on there and I'd be all good - from there I can customize the template normally. ^_^
Thank you for all your help in advance, and I really hope somebody can solve this for me.
BTW: Does anybody find it odd that Greg hasn't visited this thread in a while?
caislander
02 May 2004, 05:01
Ok I got the extra page to display, thank all of you for the information :) I have this code in my template
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
the part that is hard coded into it displays just fine but the $vbphrases don't display at all, any ideas what i might have done wrong ?
Thanks for any assistance
Synicide
02 May 2004, 05:35
So can anybody help me with my little problem? :]
Synicide
03 May 2004, 22:35
I apologize for posting a 3rd time, but is there nobody that can help with this? It's been 2 days! o_O
SVTBlackLight01
03 May 2004, 23:25
I apologize for posting a 3rd time, but is there nobody that can help with this? It's been 2 days! o_O
IMHO, it would be easier to modify one of the portals to do this than to add everything to this hack to accomplish what you need.
i fixed my issue a few lines up, eval stuff was in the wrong place. mine works like I want now.
Synicide
04 May 2004, 03:57
IMHO, it would be easier to modify one of the portals to do this than to add everything to this hack to accomplish what you need.
Hmmm... just add it to the PHP... I guess I could take a look at that, Thanks SVT. :]
SVTBlackLight01
04 May 2004, 04:04
Take a look at vBadvanced. You could propably get by with a simple template mod once you get it installed (unless you are already running one instance of it). All the blocks are contained in the index template, so you could either remove them from the template or comment them out.
Bro_Joey_Gowdy
08 May 2004, 21:48
I have a statement then one question:
Ive placed this in the websites root directory as the main page of my site:
http://www.joeygowdy.com
My forums are in a different directory:
http://www.joeygowdy.com/forum
Ive already made all the required changes, now for the question:
If I ever choose the have the vbboard switched offline for updates, will the main site also be unavailable due to the fact that Im useing vbtemplates to power my main site?
Is there a way that you can add new pages on your index directory rather than the forum directory?
Meaning, the new template works only if the file is added within the forum directory but would like to know if you can make these page work outside of a forum page.
BTW: Great hack! Clicks Install.
Edit: Sorry, I just realized you can not ask questions in here. :o
SVTBlackLight01
09 May 2004, 19:08
Is there a way that you can add new pages on your index directory rather than the forum directory?
This should get you started.
http://www.vbulletin.org/forum/showpost.php?p=482522&postcount=23
All your menu links will need to be absolute instead of relative too.
I used your code :
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
But it still does not function properly, i am still getting js errors and images are not showing.
I have this .php file outside my forum directory too.
any help ?
caislander
10 May 2004, 18:41
Anybody,
I can't get phrases created via the phrase manager to show up? Any ideas what i might have done wrong ? here (http://www.vbulletin.org/forum/showthread.php?p=507919#post507919) is the info in my template if it helps :)
As always Thanks for any assistance :0
airlinebuzz
20 May 2004, 02:42
I am trying to make a rather large template (950 lines of code), for a page using this "hack" and when I try to save and reload the template in the Control Panel it won't refresh like it saved and the changes don't load when I go to the page. Is there a maximum template size limit that I am bumping into?
airlinebuzz
23 May 2004, 04:45
bump
Skyline_GT
02 Jun 2004, 02:29
great:)
love it
SVTBlackLight01
02 Jun 2004, 03:29
I used your code :
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
But it still does not function properly, i am still getting js errors and images are not showing.
I have this .php file outside my forum directory too.
any help ?
All the js references in the headinclude template need to have an absolute path.
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Cold Steel
06 Jun 2004, 21:10
I'd like to do something a little different with this:
I have a PHP file as instructed, but I only want to include a header and footer (I've already set up templates for those). For the main page I want to include another page.
This is what I tried in the PHP file:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Except it only shows the information from the template extrapage_top.
It doesn't show extrapage_contents.html, nor does it show the code from the template extrapage_bottom.
What am I doing wrong?
SVTBlackLight01
07 Jun 2004, 16:11
Includes have to go in the phpinclude_start template. Use the example as a guide:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
All you have to add to your template is the variable for the page you want to include ($header in the example).
Cold Steel
08 Jun 2004, 09:41
Excellent - worked like a charm. Thanks!
SVTBlackLight01
08 Jun 2004, 17:26
Great. Glad to help. :)
lichtflits
13 Jun 2004, 11:11
Can cany one please tell my how i can add login,latest treads and that sort of things to the vb powerd page.
Hi
Is it possible for this to work when the forums in a subdomain on the same server?
I have tried it using PHP includes (storing the root php file in the forums dir) and that works, however permissions dont seem to work and when i use permissions via the templates(<if> statments) it doesnt recognise that Im logged in...
thanks in advance for any help
armani1072
16 Jun 2004, 01:54
great hack :D
however i am having a few issues when i try to align the tables in the body. if i try to align the table on the left the time stamp will appear on the right in stead of the bottom of where it should be. in the attached image you can see how i made two tables side by side and the time stamp appears in between the two tables. no matter what i try in the code nothing seems to move it. i will attach the code too. Any help will be appreciated :) thanks.
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
The Realist
20 Jun 2004, 22:17
Installed the test pages "Test"
Its all white and nothing shows?
Whats up, anyone?
Make sure you added the template and also added it to the template cache at the top of the page :)
I want to call this hack from the control panel but right now I'm just getting a blank screen. The template is called MAILLIST and is unchanged from page 1 of this thread.
here's my file called maillist.php which is stored at /forum/
(comments removed for brevity)
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Can't see where I've gone wrong? sure it's something simple, any ideas?
Plus, how do I ensure that I get the control panel nav rather than the normal nav?
Sarah
You can't call templates from within the admincp :)
Thanks Dean
I'm trying to run this from within the user CP.
Found my mistake:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
should be
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
but I'm actually going to be doing a hybrid of this technique and extra profile fields (http://www.vbulletin.org/forum/showthread.php?s=&threadid=59618) so hopefully I'm on my way!
No problem Sarah. Good luck with whatever you're coding :D!
The Realist
24 Jun 2004, 15:34
What do you mean by "adding it to the template cache at the top of the page" ??
Thanks M8
Make sure you added the template and also added it to the template cache at the top of the page :)
nogerorob
24 Jun 2004, 19:34
What do you mean by "adding it to the template cache at the top of the page" ??
Thanks M8
I'm a bit confused by this also. Anyone?
rob
nogerorob
24 Jun 2004, 20:35
Oh k. Finally i figured this out. I am such a n00b.
Ok,
You don't need to create a new custom template for this basic page stuff. You can have it display an existing template
If you're seeing the "all white"screen with the source:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
<BODY></BODY></HTML>
You're almost there.
The problem is probably your print_output line, you're probably printing a nonexistant template. Try using a template included with vb3 like GENERIC_SHELL. i.e.
eval('print_output("' . fetch_template('GENERIC_SHELL') . '");');
Then if you want to get creative with a new custom template, you must add it using the vB3 admin control panel. Then when you fetch_template('newCustomTemplate') it will show up instead of the "white screen."
Someone want to confirm this?
rob
armani1072
25 Jun 2004, 04:02
anybody have any idea with this one????
http://www.vbulletin.org/forum/showthread.php?t=62164&page=13&pp=15
Post #195 all the way down at the bottom
thanks
nogerorob
13 Jul 2004, 06:44
Everything works right, but my images aren't loading. Anyone know why the images won't load when I try this?
I'm doing the appropriate changedir to reach the vB root.
Thanks,
great hack :D
however i am having a few issues when i try to align the tables in the body. if i try to align the table on the left the time stamp will appear on the right in stead of the bottom of where it should be. in the attached image you can see how i made two tables side by side and the time stamp appears in between the two tables. no matter what i try in the code nothing seems to move it. i will attach the code too. Any help will be appreciated :) thanks.
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
What's your footer template look like?
You could just enclose your footer in a table.
nogerorob
14 Jul 2004, 22:56
Everything works right, but my images aren't loading. Anyone know why the images won't load when I try this?
I'm doing the appropriate changedir to reach the vB root.
Thanks,
bump.
Anyone?
Works great except the new page does not show up in the nav bar. Any ideas?
getthat
26 Jul 2004, 11:51
Hi,
I want to create a new custom page in the root directory of my website but I always get the errors below. What am I doing wrong here (I'm using vb 3.0.3) ?
Warning: main(./includes/init.php): failed to open stream: No such file or directory in /home/autosurf/public_html/forums/global.php on line 18
Fatal error: main(): Failed opening required './includes/init.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/autosurf/public_html/forums/global.php on line 18
sully02
01 Aug 2004, 02:02
Right now, I'm looking through the thread to see if it's there, but I want to include my homepage in the list of locations for currently active users. The problem? The homepage, like my forum homepage is also named index.php
So...
Homepage = www.livemockdraft.com/index.php
Forum main = www.livemockdraft.comforums/index.php
Is there a way to get the functions_online.php file to differentiate between the two?
Ghostsuit
03 Aug 2004, 04:05
Excellent guide.
Eagle Creek
11 Aug 2004, 12:01
Cool! I'm gonna install that I think!
SVTBlackLight01
11 Aug 2004, 16:51
Is there a way to get the functions_online.php file to differentiate between the two?
I would like to know this as well.
sully02
12 Aug 2004, 16:41
And while I'm at it, I would like a link to appear below their location of my new page. Every time I try to add one (Going off what I see in other conditions), I end up getting a parse error. Any suggestions?
would this be compatible with vB2 or can anybody make it so its compatible with vB2
DarkWarriorXII
15 Aug 2004, 02:58
I got my test page (test.php) to work, but it comes up without showing my forum style (it shows the original vB style). Here's the code of the page (oh yeah, the page is outside the vB directory):
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
1. What's wrong here?
2. And the links all point to my website's root directory, not my forum's root directory. For example: http://domain.com/usercp.php instead of http://domain.com/forum/usercp.php.
3. And the navbar drop down menus don't work. How do I fix this also?
Thanks for answering all my questions.
so would this or would it not work for vb2
lichtflits
17 Aug 2004, 11:03
Wreck look here http://www.vbulletin.org/forum/showthread.php?t=66153 for vb2 powerd pages
sfowler39
20 Aug 2004, 15:52
Ok I created the test page and in my template I try and put in this
<?php
$db = mysql_connect("localhost", "root", "");
mysql_select_db("reports",$db);
$result = mysql_query("SELECT * FROM hrc",$db);
echo "<TABLE BORDER=2>";
echo"<TR><TD><B>Full Name</B><TD><B>Credit Card Number</B><TD></TR>";
while($myrow = mysql_fetch_array($result))
{
echo "<TR><TD>".$myrow["firstname"]." ".$myrow["lastname"]."</a><TD>".$myrow["creditcardnum"];
}
echo "</TABLE>";
?>
I always get an error trying to put in php code into a template.
I am trying to have a page that only a group of people can view and which must be logged into the board to see this page. I want this code to be used to retrive info from a database. It works as it stands like it is and as it is but I cant place this code into a template.
Any Ideas?
MiLynne
24 Aug 2004, 03:53
I looked through all 15 pages and saw the question asked that I want answered, but no one answered it sooooo..
I'd like to use this page to integrate phpMychat into it...how would I do this?
root123
24 Aug 2004, 10:42
This is great - and it helped me a lot. But I have one problem though. I'm new to vB, so I hope that someone can help me with this problem.
I have created a non vB-page as described in this thread - and it is working fine.
But when I try to parse a variable in the URL calling the non vB-page, the variable is lost.
Ex.
http://www.mysite.com/nonvBpage.php?parm=1
In this case it seems as the the nonvBpage.php does not recieve the variable parm and its value.
How can this be (or... what am I doing wrong)?
Cheers
Root
$_REQUEST['varname']; use that for all incoming variables from a URL :)
root123
24 Aug 2004, 14:19
Thanks :o) That solved the problem .....
sfowler39
25 Aug 2004, 17:48
I can create the test page and it works fine, but I have a php page that I want to be part of the board with its user permissions. How do I call it up? I have followed all the instructions but still cant call it up.
On the first post of this thread Gary King has wrote this in the end of his post:
Also if you want to create your own pages 'within' current vBulletin files, do the following:
Open the file you want, and then right before the final ?> in the source code, add the following:
PHP Code:
if ($_REQUEST['do'] == 'xxx')
{
eval('print_output("' . fetch_template('TEMPLATE_XXX') . '");');
}
Replace 'xxx' with whatever you want ?do= in the query string to be (for example, replace 'xxx' with 'showprofile' so then someone would type in example.php?do=showprofile to view this template.) Then of course, change TEMPLATE_XXX to your template name, it's that simple!
Well my file is called test2.php in my forum dir. I added this to the bottom of my file and this is my code of the test2.php file
<?php
echo "hello";
if ($_REQUEST['do'] == 'showtest2')
{
eval('print_output("' . fetch_template('test') . '");');
}
?>
As you can see all this page is- is saying hello for my test2.php file. The webpage should be wrapped around with its pemissions that vbulletin has.
In your example you wrote this in order to view your template: example.php?do=showprofile to view this template.
HUH????
I am confused here - for one there is no file called example.php. what is the example file is this the file that is my test2.php file or index.php or cmps_index.php or I dont get it - help please to understand how to add a external php page into my site with the security of vbulletin cause i want to secure a page or 2 and if a person has not logged into the bb that is an administrator then he cant view a certain page.
If I use this http://hrc/vb/test2.php?do=showtest2
I get this as an error
hello
Fatal error: Call to undefined function: fetch_template() in c:\inetpub\wwwroot\vb\test2.php on line 6
As you can see with the hrc I am on an intranet and vb is the forum.
Gary,
Thank you very much for that, just what I needed.
It works extremely well, I changed the template code a bit so it displays several tables per page.
So thanks again.
JD. :)
btw, there is no place to click Install, but count this as one of them if you can.
For step 2, creating the template, how and where do we do that? From the admin panel? thx
indie,
In AdminCP select Styles & Templates -> Style Manager.
On the right there is a drop down box that displays All Style Options, click the v button to the right of it. From the drop down menu select Add New Template.
Hope that helps,
JD. :)
Adrian Schneider
01 Sep 2004, 22:11
Sorry if this has been covered before, but for the parent link thing (for the vb navigation) on custom pages, how do you set one inbetween the site index and the page. Say if I'm working on a 'Misc Downloads' page, can I add a link between it and the index called 'Downloads'. Thanks
Adrian Schneider
03 Sep 2004, 22:43
Bump
Surtain23
05 Sep 2004, 00:38
For all those having problems with the query strings...
I was trying to fix this, and finally I have gotten it working! This is what I used as my test file:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
I hope I helped solve some of your problems (If you even visit this thread for help). :)
rjerina
29 Sep 2004, 02:12
This looks promising gary -> a few questions !!!
1) How can I use this outside my forums directory? Do i just use this?
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
I have done this Gary, but my images arent showing up. :(
edit: ok i got the misc images to show up, but i have the avatar in navbit modification and the avatar in the navbar doesnt show up :(
there has got to be a better way to do this outside of the forum directory. this is just not working at all.
so to go off your topic but could some1 possible tell me how i would call a forum post on a vb powered page. title and post body ???
akirauk
30 Sep 2004, 10:17
Thanks this is just what ive been looking for, im going to use it as a main page ratherthan have all the gubbins that comes with a portal.
Installed and working fine, but rather than edit the template for the text is it possible to pull a certain thread from a forum? what i want to do is have a description and some pics and instructions for my rpg site.
many thanks for any help
regards
this works great when my custom page is a simple display page.
I want now a page that has several possible forms which it populates from custom database fetches. The form you get depends on data you may have previously posted to the page. I have the code written, but I don't have the page integrated into vbulletin.
So for example in the part of my code that now outputs html, that html would move to a template or subtemplates, yes? (which I must declare in the template list?) How do I go about populating them with variables I make up? I see in the vbulletin code several ways to use templates, and not sure which method to use or why.
Oh one more thing: If possible, I want also this page to look like the usercp, not the main forum.
To be concrete:
Supose my code has
SELECT * from mydatatable WHERE userid=$bbuserinfo[userid]
Then I submit the query and fetch a row into a variable called $mydatatable
I'm just gonna try to use $mydatatable in the template and see what happens.
any idea how to get this working when the forum is in a sub domain...?
I really wanna use this :(:(
site... www.site.com (/home/site/public_html/)
forum... forum.site.com (/home/forum/public_html/)
i have 2 questions.
1. how can i create a custom vBulletin page that can only be viewed by a certain member/usergroup?
2. how can i create a page, which consists of a few smaller ones? e.g. http://forums.site.com/tools.php?ftp, http://forums.site.com/tools.php?faq, http://forums.site.com/tools.php?bla, etc.
thanks in advance
blueuniverse
20 Oct 2004, 18:01
Is it possible to add PHP within the templates, so they appear on the pages? Is there a mod on this, or some fix possibly? It appears from the previous posts that, sfowler who was trying to use php within the template couldn't get it to work.
blueuniverse
22 Oct 2004, 17:47
any ideas???
trackpads
23 Oct 2004, 10:55
I would also like to know something like this. I am running a 3rd party video gallery for my site and laready have it so that user registration is required to view the gallery but I would like to know who to restrict it further to just members of several usergroups (for promotional purposes).
Here is my current PHP file, please note that this is located outside the forum directory of course-
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Thanks in advance for any help,
-Jason
SnitchSeeker
25 Oct 2004, 08:42
No one seems to be supporting this thread any more.
This is very very annoying. :(
unfortunately, i have found the same problem with some of Gary's threads.
He is probably too busy.
How do I add a custom template ? I simply cant find ADD button in the template manager. I can Custumize existing template.. but how do I add a new one ?
ACP > Styles & Templates > Style Manager > (in dropdown) Template Options > Add New Template
You have to scroll the dropdown selector content up to see it. Caught me off guard the first time too.
Thanx man ! I got it now.
JohnBee
09 Nov 2004, 18:42
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Heres the PHP code snipit that usually includes the news data into
my ewb pages, hoever I cannot get it to display in my vB powered
page, cany anyone help me?
I added this in my TEST style but it just shows blank. Any help on
matter is greatly appreciated.
thx
ambumann
10 Nov 2004, 01:23
Nice.
xeonkiller711
23 Nov 2004, 01:47
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Heres the PHP code snipit that usually includes the news data into
my ewb pages, hoever I cannot get it to display in my vB powered
page, cany anyone help me?
I added this in my TEST style but it just shows blank. Any help on
matter is greatly appreciated.
thx
Yes I want to know the same thing. I am trying to get a server query to tie into my vb pages. Any help would be awesome!
JohnBee
25 Nov 2004, 05:28
Yes I want to know the same thing. I am trying to get a server query to tie into my vb pages. Any help would be awesome!
xeonkiller711 I cured all my problems with news in my page by switching
to the coranto 1.24 news script its much more powerful than cutenews
and I was able to do anything I wanted within vBB using the phpinclude
functions.
let me know if you need any help I am more than willing to share my
configs and code.
JohnBee
25 Nov 2004, 07:13
Anyone know how to call a template from a custom style?
I want to copy and modify some common templates but I don't want things
getting all messy.
How would I pull data from an alternate style other than default?
ex: frontpage style
vBulletin® v3.6.12, Copyright ©2000-2012, Jelsoft Enterprises Ltd.