The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Details »» | |||||||||||||||||||||||||
While waiting for 2.0, I've started hacking PHPNuke to integrate with vBulletin. You can look at it at http://www.911pc.com It is very raw and nothing is guaranteed to work. I don't even know PHP, this is just a project to try to learn it a little.
[Edited by wajones on 01-20-2001 at 09:27 AM] Show Your Support
|
Comments |
#32
|
|||
|
|||
Yet the code makes it slower... exactly the reason I'm busy coding my own news manager... no messy stuff
|
#33
|
|||
|
|||
I just started playing with this and it works great for the purposes I need. I did modify it so it was more tightly integrated with vBulletin.
Full news system in a few lines of code. Code:
<?php require("global.php"); // Newsforum -- The forum that the script will pull news headlines from. Unless you want all // your users to be able to update your news, you may want to consider limiting this forum to // Moderators posting new threads...this is easily done via the vB control panel. $newsforum = 11; // News Limit -- How many stories should be displayed? $bfc_newslimit = 2; $isnews = 1; $newsbits=""; $threads=$DB_site->query("SELECT * FROM thread WHERE forumid=$newsforum ORDER BY dateline DESC LIMIT $bfc_newslimit"); while ($thread=$DB_site->fetch_array($threads)) { $postdate=date($dateformat,$myrow[dateline]+(($timeoffset+$bbtimezoneoffset)*3600)); $posttime=date($timeformat,$myrow[dateline]+(($timeoffset+$bbtimezoneoffset)*3600)); $replycount=$thread[replycount]; $username=$thread[postusername]; $newstitle=$thread[title]; $threadid=$thread["threadid"]; if ($replycount == "0") { $replies = ""; } elseif ($replycount == "1") { $replies = "| (1 Comment)"; } else { $replies = "| ($replycount Comments)"; } $posts=$DB_site->query("SELECT post.userid, pagetext,user.username as username FROM post LEFT JOIN user ON (post.userid = user.userid) WHERE threadid=$threadid ORDER BY postid LIMIT 1"); $postinfo=$DB_site->fetch_array($posts); $userid=$postinfo[userid]; $username=$postinfo[username]; //$dept=$postinfo[dept], //$category=$posts[category]; $message=bbcodeparse($postinfo[pagetext],$forumid,1); eval("\$newsbits .= \"".gettemplate("newsbit")."\";"); } eval("echo dovars(\"".gettemplate("news")."\");"); Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <HTML> <HEAD><TITLE>$bbtitle - $forumtitle</title> $cssinclude </head> <body> $header <center> <table border="0" width="98%" cellpadding="2"> <tr> <td bgcolor="#FFFFFF">$newsbits</td> </tr> </table> </center> $footer </body> </html> Code:
<table width="{newswidth}" border="0" cellpadding="1" cellspacing="0" bgcolor="#6c6081"> <tr> <td> <table width="100%" border="0" cellpadding="2" cellspacing="0" bgcolor="#FFFFFF"> <tr><td valign="middle"><font face="Tahoma, Verdana, Arial" color="#afa3c5"><b>$newstitle</b></font></td></tr> </table> </td> </tr> </table> <table width="{newswidth}" border="0" cellpadding="0" cellspacing="0" bgcolor="#EFEFEF"> <tr> <td valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr><td valign="top"><p><b>Posted by: [<a href="member.php?action=mailform&userid=$userid">$username</a>] on $postdate at $posttime</b></tr> <tr><td valign="top"><p>$message<br><br><smallfont><a href="showthread.php?threadid=$threadid">Read More</a> $replies<br><br></td></tr> </table> </td> </tr> </table> http://sitepointforums.com/news.php [Edited by wluke on 01-09-2001 at 04:54 PM] |
#34
|
|||
|
|||
I've played with bcf_weblog and it works really well, but the reason I'm playing with PHPNuke is that there were numerous requests for it and I thought it would be a fun project to try since I know nothing about PHP and want to learn.
Any of you that know PHP well enough to create a hack from scratch would be able to duplicate the functionality of PHPNuke, thats not me, but I haven't seen anything in it to damage the brain yet and there are some really good ideas to be had for any project anyone might be working on. So I'll continue my project for now, at least till vB 2.0 comes out. |
#35
|
|||
|
|||
Quote:
I realize you said this was a work in progress but from some comments, it looks like others are looking for polished integration with detailed instructions. It appears you haven't gotten that far yet from your own posts. |
#36
|
|||
|
|||
I've been dying for some integration between the two. I understand that you're just experimenting, but it's something I've been hoping to do myself whenever I got the freetime.
I know there is the weblog hack, but the ability to change views, and other nuke features make it different IMHO. I've got quite a few ideas for Nuke myself, and would love to use Nuke with vB someday. By the time vBulletin 2.0 comes out, hopefully there will be a PHP Nuke version that has no bugs, isn' soooo slow, and has clean code. If you're looking for help, you may want to create a sourceforge project. I know there are already a number of Nuke forks, but if you were to post the project, you may be able to get a couple people to help out with a port. Thanks for the work, keep it up, -Cameron [Edited by BassWriters on 01-09-2001 at 06:01 PM] |
#37
|
|||
|
|||
Heya wluke
Is there a way to limit how much is shown on the news page? Like limit it to 100 characters or 50 words.. like phpnuke I guess? Thanks. |
#38
|
|||
|
|||
Quote:
Currently I am satisfied with the "crappy code" in it's present state and with the upcomming optimations I would like it even more. By the way, the code is open source. If you don't like it. Change it or don't use it. |
#39
|
|||
|
|||
BassWriters
Unfortunately the next version of PHPNuke will have PHPBB integrated making it harder to hack for vB, so we may be stuck with the present version. The problem with the source forge idea, besides vB being a commercial product. I wouldn't have the time or know how to manage such a thingy. Plus I really don't want to make it a career. So with that... I'll share what I've done as is, as soon as I can figure out "what I've done" and how to package it up with whom ever is interrested. If someone else wants to create and manage a full blown project I'll help as much as I can. |
#40
|
|||
|
|||
Quote:
This is the weblog I'm, or was working on http://www.oldamigos.com/forums/main.php [Edited by wajones on 01-09-2001 at 06:50 PM] |
#41
|
|||
|
|||
To limit the amount of characters shown you would do something like:
Code:
if (strlen($message) > 160) { $snippet = substr($message,0,160) . " (<a href=\"".$lastposturl."\">more...</a>)<br>"; } else { $snippet = $message; } |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|