View Full Version : PluhNews 1.5
Gutspiller
07-11-2003, 11:09 PM
Yesterday at 02:29 PM upnorth said this in Post #500 (https://vborg.vbsupport.ru/showthread.php?postid=416774#post416774)
is there any way to set the number of characters that are displayed followed by "..."?
yeah it's in the config file. Just look at the config file and it's all in there.
upnorth
07-12-2003, 12:22 AM
These are the only items in the config file. I thought that $newsforums identified which forum to pull from, $newsitems identified how many threads to show at one time, and then $forumspath. Am I mistaken re $newsitems? IS this for the number of characters to display for each thread or am I missing something?
Code from config file:
========================
//Retrieve news from the correct forum, which is the forumid
$newsforums = 1;
//Number of news items to show at once
$newsitems = 10;
//Path to your forums directory (leave out trailing slash)
$forumspath = "/forums";
==========================
Gutspiller
07-12-2003, 09:56 AM
I must be thinking abut the Latest XX hack then. I use both quite a bit on my site: http://www.3dnewz.com
upnorth
07-17-2003, 07:36 PM
anyone know what would need to be changed to get an attached image file to be displayed with this hack?
D2Expansion
07-21-2003, 07:12 AM
awesome script
got it in use and integrated into my site at
www.d2expansion.com
but i have one thing i want to do, and it doesnt really have anthing todo with the script but rather with php
i split the $dateposted variable into 2 variables
//gotta convert that damn unix time crap
$dateposted = date("D, M j",$dateline);
$timeposted = date("g:i A",$dateline);
//end the goodies
wich displays it as:
$dateposted = Mon, Jul 21
$timeposted = 4:45 AM
i want $dateposted to display as Monday, July 21
is this possible?
thanks
Aku12
ga.net
08-01-2003, 11:32 PM
Im getting this error:
Warning: main(): stream does not support seeking in /home/green/public_html/index_uaap.php on line 313
FYI, i inserted this tag in my html file and saved it as php
<? include ("http://www.greenarcher.net/forums/campusbuzz.php"); ?>
Hows this?
Thanks
ga.net
08-04-2003, 07:47 AM
bump
ProParadox
08-18-2003, 04:13 AM
I added a simple bit of code to make it not say last comment was posted by $username when there were no comments. Here it is:
";
if ($replycount[replycount]==0]){
echo "<a href=\"$forumspath/showthread.php?s=&threadid=$threadid\"><b>$replycount</b> $commenttext</a>";
}else{
echo "<a href=\"$forumspath/showthread.php?s=&threadid=$threadid\"><b>$replycount</b> $commenttext</a> Last comment was by <b>$lastposter</b>";
}
echo"
SweetiePie*
09-08-2003, 02:18 PM
Hoping someone can help.
On my site, we are trying to PREVENT certain sections from being viewed in the Actice Topics list (www.clanbrats.com).
Any offers of suggestion?
3DSJFH
09-09-2003, 05:15 AM
Any clues whether this can work with vB 3 betas at its current stage?
Clegg
10-12-2003, 02:47 PM
Heres the Deal, I modified Pluh enough to work under VB3 pretty much fine. Heres the MAIN peice of code that needs to be changed:
(I emailed the writer of Pluh but his response a few months ago let me to believe that vb3 versions of the mod were far off. so reading through the vb3 functions php files I was able to ID what code needed to be altered in the Pluh script to get it to work right:
Find:
$bericht=parse_bbcode2($pagetext,"1","1","1","1");
Replace With:
$bericht=parse_bbcode2($pagetext,"","","1","1","1");
the parse_bbcode2 function has some different switches on it now that needed an additional bit and some different values. Other than that everything else was childs play to fix... so easy I cant even remember what other code changes I made.
An example is here http://www.midwestlan.com All the fields on the front page were based off the Pluh scripts but then highly modified. The Upcomign events is a script I wrote from scratch.
Tannerman
10-14-2003, 09:06 PM
Like ga.net was having problems back on 8/1, today I started getting this error:Warning: main(): stream does not support seeking in /home/tannerwo/public_html/steveandamysly/index.php on line 94Did anyone come up with a solution to fix this problem?
Unfortunately, my webhost (Ventures Online) updated Apache and PHP on my server today (as a part of an overall MySQL upgrade) and this messed some stuff up.
You can view my homepage here:
http://steveandamysly.tannerworld.com/
The modification is still pulling the last 5 posts, however an error message appears at the top of these posts.
I'm running vBulletin 2.3.2 on my forums (which are located at http://forums.tannerworld.com/). Not being a huge techie, what should I do to fix this problem? The update to Apache and PHP caused this problem, so maybe some calls need to be fixed relating to that.
Any help would be greatly appreciated.
Thanks,
Steve
Tannerman
10-15-2003, 07:22 PM
I've got an update on this problem. My webhost was able to track down the problem, which appears to be a bug in the latest version of PHP which has been documented at:
http://bugs.php.net/bug.php?id=24053
The include for PluhNews is actually working, however the error message is displayed. A quick fix is to place an @ symbol in front of the include to suppress the error message.
The bottom line is that it's a bug in PHP which will most likely be addressed in a future update, however there appears to be several temporary work arounds for this issue :)
mrplow
11-18-2003, 05:12 PM
This 'hack' is absolutely awesome dude, thanks hugely.
In use at my website, working beautifully. :D
ScubaClicks
12-03-2003, 06:53 PM
Will this work with allheadlinenews.com?
ScruffyDeluxe
12-07-2003, 04:18 PM
This rocks my box. I tried it on my Main gaming news site, worked a treat. I hacked it slightly for vB3 Gamma, worked just as well.
http://www.hoteldope.com/forums/PluhNews.php - running on my Current vB3 beta 4 testboards, also working spiffy :B
I'll be modifying this to work using only CSS1 for layout, when I learn the new template system. Finally I can get rid of vBPortal and build a custom frontpage for vB3.
*makes devil sign with hands and bangs head* YOU RULE!
Memnoch-NMX-
12-12-2003, 07:05 PM
I hacked it slightly for vB3 Gamma, worked just as well.I'm admittedly no PHP or SQL expert...not even close. But this script was extremely easy to get working with vB3 Gamma. I've got it running perfectly on my development site. My main site is still running vB 2.3.3, but with this script working I'll be moving to vB3 Gamma pretty damn soon.
And the thing I like about this "hack" the most? It requires no custom templates or modifying of existing templates at all!!
Awesome job...thanks for the script!! ;)
Beowolf
12-27-2003, 01:19 PM
Hi, I have been using PluhNews and now I modified it just a very little to work as a Game Reviews script. The problem is, that even with the threadid variable successfully passing, it still displays all the threads in the forum. (I have page1 which shows all reviews, click on one and it brings you to page two, where the correct threadid variable has been passed, but it still outputs all the threads in forum 17)
This is the line:
$sql2 = "SELECT postid, threadid, username, userid, title, dateline, pagetext, iconid FROM post WHERE threadid = '{$_GET['threadid']}' LIMIT 1";
Anyone know why it seems to ignore the WHERE and LIMIT statements?
[FG]Omega
01-01-2004, 01:04 AM
I read the previous pages but I still get this error when I try to include PluhNews.php:
Fatal error: Cannot redeclare stripslashesarray() (previously declared in /home/www/web/html/forum/global.php:31) in /home/www/web/html/forum/global.php on line 31
I did this:
I added in the PluhNews.php File this:
chdir("/home/www/web/html/forum/");
and at the end of the file:
chdir("/home/www/web/html/");
Anyone can help?
btw: I have vb 2.3.3
*edit*: made some changes in PluhNews...works now
Tannerman
01-15-2004, 08:07 PM
I've been running this without a problem on my vB2 board. Before upgrading to vB3, I was wondering if someone could list any modifications they needed to make to get it working.
Mithan
02-13-2004, 10:39 PM
I just upgraded my forum to a clean install of vBulletin 3.0, and got PluhNews working with it.
Here are some tips for people doing the same:
PluhConfig.php
Basic editing here...
Edit:
$newsforums = ; to the new News Forum. (same # if you just upgrade)
$forumspath = "/forum"; to the new vB 3.0 forum dir (probably the same)
PluhHeadlines.php
Basic editing here...
Change:
require("./admin/config.php");
to
require("./includes/config.php");
PluhNews.php
Change:
require("./admin/config.php");
to
require("./includes/config.php");
Change:
$bericht=bbcodeparse2($pagetext,"1","1","1","1");
to
require_once("./includes/functions_bbcodeparse.php");
$bericht=parse_bbcode2($pagetext,"1","1","1","1","1");
Where you might have problems:
Getting the global.php file to load in PluhNews.php may be a problem.
For me, the old method of loading the global.php file didn't work.
This WAS my code for vb2.3.4:
chdir("/home/virtual/site22/fst/var/www/html/forum/");
require("./global.php");
require("./PluhConfig.php");
require("./admin/config.php");
....(at the bottom of the page)...
chdir("/home/virtual/site22/fst/var/www/html");
That did NOT work.
I had to delete require("./global.php"); from PluhNews.php entirely (or // it out) and I had to move it to my main sites index.php file.
This is what I put in at the top of my Index.php File:
chdir("/home/virtual/site22/fst/var/www/html/forum/");
require("./global.php");
chdir("/home/virtual/site22/fst/var/www/html/");
This is what the top of my PluhNews.php File looks like now:
chdir("/home/virtual/site22/fst/var/www/html/forum/");
require("./PluhConfig.php");
require("./includes/config.php");
Anyways, to make a long story short, I got this working fairly quickly, the only problem was with the global.php file not working, which stops the parsing and doesn't allow your script to format the output correctly.
A good way to error test is to // (rem) out require("./global.php"); and replace $bericht=bbcodeparse2($pagetext,"1","1","1","1"); with $bericht=$pagetext;
That will allow you to do some basic error checking and isolate the global.php problems from the actual news posting.
I still get MySQL errors though. Trying to suppress those now...
Tannerman
02-16-2004, 02:18 PM
Mithan, thanks for posting about your progress. I appreciate the details. I haven't got vB3 up and running yet, but this is going to be very helpful soon!
Ah got it running, no global.php problems, running RC4
Tannerman
03-11-2004, 10:12 PM
Ah got it running, no global.php problems, running RC4Owen, thanks for the update. What sort of modifications (if any) did you make to the original script?
What Mithan suggested I do, didnt do the global.php stuff though... His Post: https://vborg.vbsupport.ru/showpost.php?p=476423&postcount=521
Crazy Pete
03-22-2004, 03:48 PM
What do you have to alter to have this recognize the vB3 bbcode? Right now it just seems to ignore it. Thanks.
HUNTER|UF
03-24-2004, 11:41 AM
Thanks Mithan i got it working fine, i think on my site running vb3 full :D
JacobiKenobi
03-26-2004, 03:49 PM
Wow, all I have to say is GREAT SCRIPT!
definitely in top 5 for me. Does exactly what I want. and fully customizeable and easily comprehendible for changes!!
i have 1 small problem though, concerning smilies/images, and I would bet that it interferes with some otehr bbcode thing but I haven't checked yet.
i place the script here: /website_root_directory/forum/PluhNews.php
i php-include the script here: /website_root_directory/another_directory/some_page.php
and the smilie doesn't show up. i viewed the properties of the smilie and this is where it is trying to load it from: website_root_directory/another_directory/images/smilies/some_smilie.gif
how can i fix this so it grabs the smilie images from the forum directory?
JacobiKenobi
03-26-2004, 03:50 PM
By the way, i may edit this news script and release a version for vB 3.0.0 with some extra features.
Is there any way of making it so it cuts the news post to a certain number of characters and adds a [Read More] URL to the end of a news post?
FleaBag
04-21-2004, 03:24 AM
Running this on vB3 also, wicked. Good to be able to come back to this after vB2.
martinh4
05-02-2004, 03:45 PM
Thank's Mithan for the VB3 changes got this working now. :)
HUNTER|UF
05-25-2004, 07:54 AM
ok little help need to get rid of the errors above the script inclues here:
http://www.cunning-play.com
Beowolf
08-15-2004, 06:02 PM
Working on those new features, and yes, the script includes the (0 Comments, last comment was by So-and-so).
This might take a while, so bear with me... :)
Ok, just incase anyone needs to full code that works on vb3, I am using this successfully from my basedir (i.e PluhNews.php is not in my /forum directory)
You will need to change the two occurances of "username" at the top and bottom in chdir() to your site username.
<?php
chdir('/home/username/public_html/forum');
//PluhNews 1.5 released under GNU GPL Licence version 2.0 (see copying.txt file for more info)
//Set your permissions in your control panel to make sure that only YOU and who you specify can post news. Otherwise, everyone and their dog can register and post in your news forums, thus posting where your news will appear. But for this script to work it's extra magic, be sure your members can reply to your news posts.
require("./global.php");
require("./PluhConfig.php");
require("./includes/config.php");
//scroll down to edit the HTML for the news
//**********************
//Start the goodies (please do not edit to goodies unless you know what you are doing
//connect
$connection = mysql_connect("$servername","$dbusername","$dbpassword") or die ("Cannot connect to server.");
//select database
$db = mysql_select_db("$dbname", $connection) or die ("Could not select database.");
// create sql statement
$sql = "SELECT threadid, title, forumid, replycount, postusername, postuserid, lastposter, dateline, iconid FROM thread WHERE forumid = \"$newsforums\" ORDER BY threadid DESC LIMIT $newsitems";
//execute sql query
$sql_result = mysql_query($sql, $connection) or die ("Could not execute query.");
if (!$sql_result) {
echo "<p>Could not get record.";
}
while ($row = mysql_fetch_array($sql_result)) {
$threadid = $row["threadid"];
$title = $row["title"];
$forumid = $row["forumid"];
$replycount = $row["replycount"];
$postusername = $row["postusername"];
$postuserid = $row["postuserid"];
$lastposter = $row["lastposter"];
$iconid = $row["iconid"];
$dateline = $row["dateline"];
//create the second SQL statement to pull the post from the thread it resides in
$sql2 = "SELECT postid, threadid, username, userid, title, dateline, pagetext, iconid FROM post WHERE threadid = \"$threadid\" ORDER BY postid ASC LIMIT 1";
//execute second sql query
$sql_result2 = mysql_query($sql2, $connection) or die ("Could not execute query in second sql statement.");
if (!$sql_result2) {
echo "<p>Could not get record in second statement.";
}
while ($row2 = mysql_fetch_array($sql_result2)) {
$pagetext = $row2["pagetext"];
//gotta convert that damn unix time crap
$dateposted = date("D j M Y, g:i A",$dateline);
//end the goodies
if ($replycount==1) {
$commenttext = "Comment";
}
else {
$commenttext = "Comments";
}
require_once("./includes/functions_bbcodeparse.php");
$bericht=parse_bbcode2($pagetext,"1","1","1","1","1");
// **********************
//Edit the HTML here (keep in mind that any double quote that is HTML requires a backslash in front of it)
echo "
<a href=\"$forumspath/showthread.php?s=&threadid=$threadid\"><b>$title</b></a> - <a href=\"$forumspath/showthread.php?s=&threadid=$threadid\"><b>$replycount</b> $commenttext</a><br>
Posted By <a href=\"$forumspath/member.php?s=&action=getinfo&userid=$postuserid\"><b>$postusername</b></a> at <i>$dateposted</i>
</center>
<blockquote></a>$bericht</blockquote><center><a href=\"$forumspath/showthread.php?s=&threadid=$threadid\"><b>$replycount</b> $commenttext</a> Last comment was by <b>$lastposter</b></center><hr noshade height=\"1\" width=\"60%\"><p>
";
}
}
//add news search stuff (this is optional - delete if you do not wish to include this, or edit it to meet your needs
echo "<center><a href=\"$forumspath/search.php?s=\">Search the News</a> | <a href=\"$forumspath/forumdisplay.php?s=&forumid=$newsforums\">View All News Posts</a></center>";
//end HTML edit
//**********************
//disconnect
mysql_free_result($sql_result);
mysql_close($connection);
chdir('/home/username/public_html/');
?>
mrplow
08-15-2004, 08:54 PM
One thing seems different since my u/g to vb3, and that is the URL parsing...
With vb2 if a news post had a really long URL in it the pluhnews page would show the http://www.blahblah...blah.com (i.e. cut down size) link just like the normal showthread templates do. With pluhnews running on vb3 the links no longer get cut down... they still get cut down in the normal forum view but on the news page the full length URL is shown. This sometimes causes havoc with the site layout.
Anyone have any idea why that is and how it can be changed?
FleaBag
08-16-2004, 06:51 PM
A function name has probably changed between vB2 and vB3.
mrplow
08-17-2004, 11:41 PM
A function name has probably changed between vB2 and vB3.
Any idea what that might be? ;)
speedracer68
02-04-2005, 12:53 PM
Is there a way for PluhNews to pull info on the most peoplied or the hotest topic at the time? I would like to put a box on my home page that would show the hotest topic each time the home page it loaded.
I looked at some of the sites people listed above to see how theirs worked and every single page I clicked on is no longer there. It's like all the link above point to old web sites that are no longer there.
Thanks for the help!
ChiefPhillips
02-17-2005, 03:24 PM
I've tried everything here... and not one thing worked, guess PluhNews isn't for me :(
I use 3.0.6, imported IPB 1.3.1 into it, working just peachy.. well.. cept PluhNews, heh.
PsiNyde
04-21-2005, 10:25 PM
good job Beowolf! I've been hounding Kayn for weeks now to update that script to work with vB3 [I work at his site now], but since he's moved on to bigger and better projects for news posting on home page, he has abandoned it. FOR CRY! Glad to see somebody figured out the bbcode parse problem! That was the only real hangup. Awesome job, thanks again.
I'm getting this on my 3.0.7 board using the pluhnews.php that beowolf posted.
Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /global.php on line 329
Warning: Invalid argument supplied for foreach() in /includes/functions.php on line 2290
Shredder
11-26-2005, 06:26 PM
What would I use if the index.php for my forums is located in the base directory? I tried a few different variations, and I keep on getting error messages...
/home/krang1/domains/twelveoclock.net/public_html dosn't seem to want to work either...
Do you think we'll see an update of this for vb 3.5? I have used pluhnews forever, and love it. The headlines seem to still be working ok, it just isnt pulling the threads for news. you can see the error here: http://www.lamerc.com
Fatal error: Call to a member function on a non-object in /usr/local/www/data-dist/includes/functions_bbcodeparse.php on line 384
glowinggal
12-18-2005, 03:50 PM
I don't see errors - what did you do to fix it?
RonanHayes
02-19-2006, 07:34 PM
Getting a similar error there is something wrong with:
$bericht=parse_bbcode2($pagetext,"1","1","1","1","1");
I believe it requires an extra parameter:
return parse_bbcode2($bbcode, $dohtml, $dobbimagecode, $dosmilies, $dobbcode, $iswysiwyg, $donl2br);
But Im no php person. If you remove this, then it does seem to work, but I am assuming that there is a problem with the bbcode. As the BBCODE is not parsed when I remove it.
upnorth
02-24-2006, 06:35 PM
Anyone know if this works for 3.5? I'm running 3.0.7 and am in the middle of moving to a new sever and want to put the latest version of vB but need to make sure all the other goodies still work. Any feed back would be appreciated.
Anyone know if this works for 3.5? I'm running 3.0.7 and am in the middle of moving to a new sever and want to put the latest version of vB but need to make sure all the other goodies still work. Any feed back would be appreciated.
Didnt work for me, I ended up swapping to this: https://vborg.vbsupport.ru/showthread.php?t=83005
Tannerman
02-25-2006, 11:48 PM
I got a "Could not select database" error when upgrading to 3.5. I don't know how to fix.
Anyone have luck modifying this?
johnn
03-23-2006, 07:34 AM
Im also interested in this, as I can't seem to get vb external to work for me.
Dot50Cal
05-04-2006, 12:34 AM
Solved, working on getting content shown in 3.5!
Dot50Cal
05-04-2006, 03:51 AM
Just an update, I fixed all MySQL errors, and now I've hit a message parsing problem. Im confident that it is the last issue, right now pointing my browser shows the forum title, poster, date etc everything except comments and the posts content. So Im working on that now :D
Dot50Cal
05-05-2006, 02:18 PM
Post content is shown. Pluhnews is working almost 100% on Vb3.5!! Im working on parsing now, and once thats solved Ill probably re-release this as its the best hack I've ever used and lets face it, the 3.5 world NEEDS a news ripper and ONLY a news ripper! Not some CMS bull! You can view it for yourself here:
http://www.thehorrorisalive.com
Dot50Cal
05-10-2006, 07:47 PM
Got it working 100%. Ill be posting it in the 3.5 section in a day or so, I just need to clean up the dirty "my site only" code. Though it seems youll have to do some text edits, since a lot of the pre-defined info no longer works with 3.5.
Did anyone ever put out an update for VB3.5+?
Tannerman
01-04-2007, 03:20 PM
Not that I know of.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.