The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Details »» | |||||||||||||||||||||||||
Basically the BFC Weblog System is active topics with some extra (IMO usefull) features. One of your forums is converted to a news forum, and the script parses that forum for headlines. The result is a Slashdot-esqe output that runs off of vB. I have been running it on my site for a week while developing it and not had any major problems.
BFC Weblog System in Action -- http://www.eternityproductions.com BFC Weblog System Readme -- see zip file below BFC Weblog System Source Files --http://www.eternityproductions.com/d...ble/bfc_ws.zip Following is a paste from the readme for the install, which would probably be a wise place to visit before you attempt any upgades The BFC Weblog system is a script that works with the vBulletin forum program. It is a bit like active topics in that it extends the use of vB to other portions of a website; in this case, the front page, but it takes things a step further. When I decided to write the program it was because I already knew that I was going to be using vB, was comforatable in PHP4 and mySQL, and wanted to have a news submission program that the users of the site could easily adapt to. In addition, the BFC Weblog allows EP to do away with seperate user authentication issues -- as they are all handled by vB. I wanted something ala Slash or Scoop, but I already had the message board, and didn't need that kind of weight. The program is still in very early development and will continue to be for some time, but I believe that by realeasing it on the public that maybe someone else will find some use for it, be able to add to it, or be able to fix bugs, etc. So, we move on to the program itself... As you just read, the BFC Weblog needs vBulletin (vB) to work. So if you don't have vB, anything beyond this point probably would not be of much use to you. It works like this: One of your vB forums becomes a "news forum," from which the BFC system grabs headlines, et cetra. You can customize the news forum just like any other vB forum, including who can start new threads (I would suggest you limit the news forum only to Moderators), who can reply, who can read, and so on. In my emulation of Slashdot, I added the column "dept" (department), so that the poster could make a funny, ficticious (sp) dept. that the story came from. I also added the column "category" to help classify the story ("science","computers","linux"). The news script determines the name of the picture via the name of the category. For example, the category science looks for "science.gif." This makes adding categories later as easy as editing the templates to include them as options and uploading a .gif file of the same name to your BFC icons folder. I would recommend not using spaces in category names. You can download the package here. The only version of vB that I have tested this in FYI is my own, ver 1.1.2. To implement the BFC System, you must edit 3 vB files, add 2 new templates, alter 1 mySQL table and setup the BFC files (2). Before you do ANYTHING, backup your files and consider a database back as well. Messing with mySQL is pretty routine, but you can never be too safe. Here are instructions, as best as I can explain them Be cautious about cutting and pasting as lines wrap here that don't wrap in code. Double check your spaces. 1) Use telnet or PHPmyAdmin to edit the "post" table in your vB database. I believe that by default vB chooses the database name "forum" but you should check your self. Here are abreviated instructions for connecting to your mySQL server upon telnetting into your box: Code:
At the prompt, type mysql -u root -pyourpassword forum you will be presented with a mysql> prompt type ALTER TABLE post ADD COLUMN dept VARCHAR(255); you will be presented with a mysql> prompt again type ALTER TABLE post ADD COLUMN category VARCHAR(50); type quit 2) Fire up your vB control panel (log on as Admin) and add the following 2 templates. You can simply cut-n-paste from your browser window. Name them newnews and editnews (right click, save target as). newnews template editnews template 3a)Use your favorite text editor and open newthread.php. Scroll to approx line 4, where it says require ("global.php");. Directly underneath that line, type Code:
require("bfc.php"); Code:
$dept=censortext($dept); Code:
$DB_site->query("UPDATE post SET dept='".addslashes($dept)."',category='$category',title='".addslashes($subject)."',pagetext='".addslashes($message)."',allowsmilie=$allowsmilie,email=$email,signature=$signature,iconid=$iconid WHERE postid=$posts[minpost]"); Code:
$DB_site->query("INSERT INTO post (dept,category,postid,threadid,title,username,userid,dateline,pagetext,allowsmilie,email,signature,ipaddress,iconid,visible) VALUES ('".addslashes($dept)."','$category',NULL,$threadid,'','".addslashes($postusername)."',$userid,".time().",'".addslashes($message)."',$allowsmilie,$email,$signature,'$ipaddress',$iconid,1)"); Code:
if ($foruminfo[newthreadtemplate]!="") { $usetemplate=$foruminfo[newthreadtemplate]; } else { $usetemplate="newthread"; } Code:
if ($forumid == $newsforum) { $usetemplate="newnews"; Code:
if ($foruminfo[newthreadtemplate]!="") { $usetemplate=$foruminfo[newthreadtemplate]; } if ($forumid == $newsforum) { $usetemplate="newnews"; } else { $usetemplate="newthread"; } 3b) Open editpost.php. Scroll to approx line 4. Where it says require ("global.php");. Directly underneath that line, type Code:
require("bfc.php"); Code:
if ($foruminfo[edittemplate]!="") { $usetemplate=$foruminfo[edittemplate]; } else { $usetemplate="editpost"; } Code:
if ($forumid == $newsforum) { $usetemplate="editnews"; Code:
if ($foruminfo[edittemplate]!="") { $usetemplate=$foruminfo[edittemplate]; } if ($forumid == $newsforum) { $usetemplate="editnews"; } else { $usetemplate="editpost"; } Code:
$postinfo=$DB_site->query_first("SELECT dept,category,userid,dateline,title,pagetext,allowsmilie,signature,email,iconid FROM post WHERE postid=$postid"); Code:
$dept=$postinfo[dept]; $category=$postinfo[category]; Code:
$dept=censortext($dept); Code:
$DB_site->query("UPDATE post SET dept='".addslashes($dept)."',category='$category',title='".addslashes($title)."',pagetext='".addslashes($message)."',allowsmilie=$allowsmilie,email=$email,signature=$signature,iconid=$iconid WHERE postid=$postid"); 3c) Open global.php (the one in the root of your forum, not the one in /admin). Scroll to approx line 682. Look for if ($bbuserid==0) {. Directly ABOVE that line, paste the following: Code:
if(isset($isnews)) { You are now done editing global.php. You can safely save and close it. That is all the editing of existing vB files that you will need to do. 4) You should have already downloaded and unpacked the BFC Weblog zip file. If not, please do so now. Open bfc.php in your favorite text editor. You will see several options you can set that will affect the operation of the script. These are mostly self explanitory, but I'll run down them here as well. The first options you will see are the database connection options. The syntax for the first line is: Code:
$db = mysql_connect("localhost", "username", "password"); The next line is: Code:
mysql_select_db("forum",$db); The next line is: Code:
$newsforum = 4; The next line is: Code:
$timeoffset = 3; The next line is: Code:
$forum_url = "http://www.eternityproductions.com/forums"; The next line is: Code:
$icon_url = "http://www.eternityproductions.com/images/icons"; The next line is: Code:
$bfc_newslimit = 15; The next line is: Code:
$bfc_hborder = "#000049"; The next line is: Code:
$bfc_hshade = "#CCCCCC"; The next line is: Code:
$bfc_htext = "#000049"; Once you have set all these options you can save and close bfc.php. 5) You might want to open news.php to check it out but it should be fine by default. The section that generates the story is very obvious, so you can easily edit it if you need to change any look or feel of the news. 6) Upload the BFC icons to the URL you specified in bfc.php. 7) Upload bfc.php & news.php to your vB directory, or a directory in your php_include path. 8) Upload global.php, newthread.php, & editpost.php. 9) Verify that everything still works then incorporate news.php into another .php page to observe it's output. You can find a simple file to do that in your zip file called callnews.php. 10) (totally optional) Send me an email!. I get a kick out of seeing other people use stuff I've written, that's what keeps me going. So if you like what you're using, or not, let me know. Right now this is in version 1.0. I still consider it beta thou, so be aware of bugs, lack of features, whatnot. I wrote this in about a week in my spare time and will probably continue to develop it that way since I can't pay the bills with it . Anyway I hope you like it and that my instructions were clear enough to understand. Feel free to drop me a line. Credits I examined Krucifyx's active threads hack extensivly before writing this, and adapted some of that code to this script. The reply counter was especially useful. If you feel you should be listed here and are not, please email me and we will clear it up. [Edited by AC-3 on 09-17-2000 at 03:19 PM] Show Your Support
|
Comments |
#2
|
|||
|
|||
I forgot to add -- you should place news.php and bfc.php in the root of your forum directory to make it work properly.
If you have any questions or suggestions, please feel free to email me (macross@mail.utexas.edu) [Edited by AC-3 on 07-20-2000 at 05:36 PM] |
#3
|
|||
|
|||
WOW!
Excellent job AC-3. I've been waiting for a hack like this and I can't wait until I get time to implement it on my forum. Cameron |
#4
|
|||
|
|||
have this hack, I tried the link and get a 404 error to the download. Would really like to check it out.
|
#5
|
|||
|
|||
I can't get into the site
|
#6
|
|||
|
|||
Ok what am I missing here. I followed the instruction to the t and I am getting problems. When I post a message to the board it does not truncate anything. The output on the webpage is the full news article. Any help is appreciated.
Yes I did do the Code:
At the prompt, type mysql -u root -pyourpassword forum you will be presented with a mysql> prompt type ALTER TABLE post ADD COLUMN dept VARCHAR(255); you will be presented with a mysql> prompt again type ALTER TABLE post ADD COLUMN category VARCHAR(50); type quit |
#7
|
|||
|
|||
truncated subjects aren't in this release I'll probably re do it again with that support in mind.
|
#8
|
|||
|
|||
Excelletn Job!
|
#9
|
|||
|
|||
I see that on your site you added the categories, and the reply, do you think you can post this addon for the hack?
Or anyone know how to do this? I think the file I need is called category.php andit wasn't included on the hack 1.0 version! btw here's what I'm talking about: http://www.eternityproductions.com/category.php Thanks in Advance [Edited by conan on 09-20-2000 at 03:34 PM] |
#10
|
|||
|
|||
Anyone? I would really appreciate anyone's help on this, I cannot get a hold of Paul (the author)
Thanks |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|