Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by (Guest)
Developer Last Online: Jan 1970 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 01-02-2001 Last Update: Never Installs: 0
 
No support by the author.

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

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 01-09-2001, 05:27 PM
Guest
 
Posts: n/a
Default

Yet the code makes it slower... exactly the reason I'm busy coding my own news manager... no messy stuff
Reply With Quote
  #33  
Old 01-09-2001, 07:50 PM
Guest
 
Posts: n/a
Default

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")."\");");
News Template
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>
Newsbit Template:
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>
I am currently adding more portal like stuff to it but no previews. Of course I have a long way to go to catch up to PHP-Nuke but I like creating my own stuff. It is pretty sparse now but I will be adding to it over the day...

http://sitepointforums.com/news.php

[Edited by wluke on 01-09-2001 at 04:54 PM]
Reply With Quote
  #34  
Old 01-09-2001, 08:30 PM
Guest
 
Posts: n/a
Default

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.
Reply With Quote
  #35  
Old 01-09-2001, 08:42 PM
Guest
 
Posts: n/a
Default

Quote:
Originally posted by wajones
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.
If it works for you, then go for it. I mainly posted that for those who said they were having a hard time getting things to work. This would be simpler for some people.

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.
Reply With Quote
  #36  
Old 01-09-2001, 08:59 PM
Guest
 
Posts: n/a
Default

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]
Reply With Quote
  #37  
Old 01-09-2001, 09:14 PM
Guest
 
Posts: n/a
Default

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.
Reply With Quote
  #38  
Old 01-09-2001, 09:24 PM
Guest
 
Posts: n/a
Default

Quote:
Originally posted by wajones
Well, since I'm not a PHP programer and in fact not good at programming anything. soooo I'll never know the difference Beside's if I can get the functionallity of the Nuke addon's and still be able to utilize vB for the important core then I'll be happy.

You are right about the Nuke code being crappy and inconsistant, that's what you get being the code has been pieced together by many different people. But if it works it's a starting point and I haven't seen many offer a front end portal with as much functionallity and ease of installation and use for the price yet. [/B]
I totally agree with you wajones. To me personally, the code is not that slow and have yet to see another portal with that type functionality. I was also planning on integrating vbulletin with nuke but as for now I don't know PHP. I am currently caught up in trying to study for my Cisco certification. After I got to a stopping point, I was planning to teach myself PHP. Nuke optimization was definately on the list also.

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.
Reply With Quote
  #39  
Old 01-09-2001, 09:33 PM
Guest
 
Posts: n/a
Default

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.
Reply With Quote
  #40  
Old 01-09-2001, 09:38 PM
Guest
 
Posts: n/a
Default

Quote:
Originally posted by _
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.
I'm was working on another project with weblog that does that but you have to modify the datadase as I did, or truncate what you show... wluke can probably show you that, I know you can, but don't know how right off.

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]
Reply With Quote
  #41  
Old 01-09-2001, 09:56 PM
Guest
 
Posts: n/a
Default

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;
        }
Then reference $snippet in the template instead of $message.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:49 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04329 seconds
  • Memory Usage 2,288KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete