The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Hello,
Has anyone modified vB to insert HTM documents within a forum topic? I would like to have a 'documentation' section on my web site with a table of documents for the user to chose from. I was planning on using a vB 'forum' page for the document index. When a user selects a document (actually a vB topic) from the page, I would like the document to appear at the top of the page and then at the bottom a forum topic would be available for the user to post comments or questions about the document. I would like BOTH to appear on one page. I slapped something together with a Snitz forum that appears to work. I simply name the .htm file I want to include in the forum topic with the forum topic id. (i.e. 8.htm), then I have some code in the topic-display page that looks for that file in a directory and includes it. The format is something like this: Top of page: ------------------------------------ This document tells you everything you want to know about dirt. 1. dirt gets things dirty 2. dirt is tough to get out of your shirt. 3. I like dirt ------------------------------------ What do you think about dirt?: <forum topic appears here> -post1 -post2 -post3 ------------------------------------ bottom of page Can this type of thing be easily done with vB? I'm considering a purchase of vB to replace the Snitz forum. Thanks, PM |
#2
|
|||
|
|||
![]()
If i understand you correctly, this isnt too hard, using PHPs output buffering functions inside the 'PHPinclude' template
|
#3
|
|||
|
|||
![]()
Would you be able to provide some sample code that uses PHP's buffering functions? Are those types of functions already used somewhere in vBulletin? I am brand-spankin'-new to this php stuff. I'm not afraid to dig into it a bit - I'm just looking for some direction. Any manual pages you can point me to?
I'm trying to figure out the logic of the vBullitin processing. I see that the 'showthread.php' process is the one that displays the page, and the 'makenavbar' function apparently displays the top navigation bar. I would suspect that I would need to update the 'showthread.php' somewhere around there to insert the HTML from the other page.... Thanks for the response Merk! Now I need to find out why I didn't get an email from vBulletin when you updated my thread.... |
#4
|
|||
|
|||
![]()
Ok,
I did some experimenting and have made some progress... but I just need a wee bit of help now: I updated the showthread.php, and added the following to the bottom: PHP Code:
$fieldnote just after the $header - this test works great!. however.... I would like the '.htm' file to be dynamic. The name of the .htm file should match the thread id.... so the 'require' command would need to be updated to reference the threadid variable. something like: require("../fielddoc/1/" $threadid ".htm"); .. as I said I'm really wet behind the ears on this php stuff. What would the correct syntax for that command be? Any suggestions for an on-line guide to basic php? ![]() |
#5
|
|||
|
|||
![]()
This isnt too hard, and i hope im not too late replying, been out of action for quite a while.
its simple> PHP Code:
That should solve your problem |
#6
|
|||
|
|||
![]()
Right on. That looks like it did it!
Thanks for the reply Merk! Can you recommend any good php Tutorial web sites, so I can get myself up to speed on this stuff? Thanks! |
#7
|
|||
|
|||
![]() Quote:
I dont really like the tutorial websites, and im more of a 'book' person. I can recomend, 'Core PHP Programming Edition 2' It has a purple spine. A very wonderful book. Someone else may be able to help you with some tutorial websites however! ![]() |
#8
|
||||
|
||||
![]()
<a href="http://www.php.net/manual/en" target="_blank">http://www.php.net/manual/en</a>
The official PHP Manual online... Not much of a tutorial, I'm afraid... but it's good when you need to learn the application of specific functions to do things. I've used it a lot lately. |
#9
|
||||
|
||||
![]()
Maybe I'm missing the point, but couldn't you just add questions to the FAQ? I know it would turn it into a "your FAQ" + "vB FAQ" but still...
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|