View Full Version : PluhNews 1.5
UPDATED! Woohoo!
I just fixed/added stuff from version 1.0!
Download the new version 1.5 if you have the old 1.0 - lots of better features.
From the readme.txt:
This script isn't really a hack, just an external script that pulls information out of the VBulletin Database for news
or whatever reason you see fit. It's easy to install and configure, and has tons of the same features that many other
news scripts have, except you don't have to modify any Vbulletin source code (which I'm never comfortable doing
for some reason, but that's just me :).
I had a really rough time finding a good, EASY news script that did what this does. I searched and found some, but
it really came down to easy installation. I didn't want to modify MySql tables or mess with the advanced Vbulletin
source (well, to me anyway). So I wrote this script. Yer.
This script was intended for VBulletin 2.0 only (I don't know if it will work with previous releases) and PHP4.
Working Demos can be found in use at http://pluh.com/forums/PluhNews.php and for headlines,
http://pluh.com/forums/PluhHeadlines.php
After you install, if at all possible, I would appreciate some credit to my script. A link to http://pluh.com
on your page before or after your news would be great. Let me know when you have it installed too - I love
seeing my stuff working on other websites!
You can check out the raw demo here for PluhNews: http://pluh.com/forums/PluhNews.php
And Headlines! http://pluh.com/forums/PluhHeadlines.php
Let me know if you like it! (Thanks Dark Wizard and Bane)
*NOTE: I will not be able to provide support for this hack, as I am extremely busy. Sorry...*
99SIVTEC
07-03-2001, 07:30 PM
Sweet script, this is what i've been looking for. I have one problem though. After configuring everything the links to view the news appear on my page but when you click on the links is is looking at the wrong path. It is using the default /forums path instead of the one I specified in the config file. you can see what I mean over at MY SITE (http://www.highaltitudeimports.com/HAIframeset.html)
99SIVTEC
07-03-2001, 07:32 PM
Ok i'm a moron, you can delete that last post if you want. It was a simple line I needed to edit in the html portion of the script. If your forums are in a directory other than /forums then you need to edit the text to the links at the bottom of the script in the html section. On a side note how would I go about changing the text color displayed so I can change the background color of my table?
You can change that using plain HTML. Like , <font face=\"#000000\">blah blah</font> Just remember the slashes in front of the quotes so you don't get a parse error when the script executes.
...that's a good suggestion though, an option for font colors inside the setup. I'll take note of that for the next release, plus more options.
Looks like the script is working for you! That is very good. Yes. :)
(the error that you were talking about was fixed - stupid me)
TechTalk
07-04-2001, 01:13 AM
This is an awesome script! Didnt want you to think noone was checking it out ;)
If you could make it do auto formatting on the posts (so i dont have to use html in my news posts) I would be a happy camper! I think you could sneak some code out of printthread.php and noone would notice ;)
As soon as this is added this feature will be added to iguanaland.com :) Hell, i will even give you credit!
Thanks again
~Chris
Hey man, thanks! It was really simple to do too (the code, for any php guru, is a no-brainer).
I did some research on the auto formatting and came across some special functions that allow breaks without <br>'s and <p>'s. Just gotta test 'em.
I'm going to attempt to get the rest (like VBcode, etc) to work. This would make this script much better for people, like yourself, who don't want to hassle with HTML. :)
Thanks again!
RobAC
07-09-2001, 09:25 PM
First off....this is a very cool hack and exactly what I was looking for. However, there are a couple problems:
1. The html in the new.php file needs to be checked/cleaned. It's not a big deal and it isn't that bad...but just being picky. :)
2. The time stamp seems to be screwed up. The times that the posts were actually made is incorrect and looks like they are 1-2 hours ahead of the actual posting time.
3. Suggestion....you may want to see how you can require the config.php file in the admin directory rather than including the database name, password, etc right in the php file. Just a suggestion.
Otherwise, good job!
Thanks man for the suggestions.
1. The HTML was thrown together really quick, but that is a good idea for a future release.
2. I don't know why the time is messed up. A bug to tackle!
3. Another good idea. Will work on it. :)
RobAC
07-11-2001, 01:04 AM
Just another suggestion. It would be great if this hack was able to parse vb code. :)
TechTalk
07-11-2001, 01:35 AM
Be easier to just recreate printthread.php IMHO
I went through printthread.php, and I was scratchin' my head. I'm gonna try some stuff with the code. I got the results to recognize line breaks, which was actually easy. :)
But once I get this working with VBcode and all that stuff, I'll be sure to let you know.
Thanks!
White Knight
07-11-2001, 05:37 PM
Nice job on the addon i would say.. I am using it at my site right now for the front page www.sportbikes.net
I did notice about the line breaks it would be nice if it can look just like what is posted. Because If I do add the line breaks then the post looks wrong. Just something I noticed.
Also.. This is kind of a permission thing but I figured I would ask here. I want it so only admin and moderators can post in the forum but everyone can reply. Is there a place I need to go to set this permission up?
Thanks again.. keep up on the updates.. i love it
Goodbye newspro.. hello Pluhnews
eva2000
07-11-2001, 05:50 PM
this looks great just needs parsing of vB code & smilies and sent to friend link and you're set :D
jarvis
07-11-2001, 06:59 PM
White knight...
I like how you have the
"0 Comment(s) Last comment was by Fred"
after your news posts. Did you use this hack to do that, or is there some other line of code that your are using? I would like to be able to do this at my site www.mhogaming.com
Thanks for the help!! :)
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... :)
Dark_Wizard
07-12-2001, 12:47 AM
I have fixed the time so it displays properly....Kayn >> I PM'd you can you get back to me so I can give you the changes?
SuitCase
07-12-2001, 08:48 AM
Wow, this hack looks excellent! Great work, Kayn.
One question, though... Can I make multiple news forums and have several news things used on different pages? If not, would it be too hard to modify it and make that work? Thanks. :)
White Knight
07-12-2001, 12:58 PM
Hey Kayn I found something I dont know if someone pointed out.
Today I tried to add a new post which worked fine. The problem is the vb URL tag does not work correctly. The code just shows and does not make the url. I went back into the post and used html code but I figured this would be something to look at.
Just trying to give a helping hand. This script is very nice for me not having to give away passwords for newspro..
White Knight
07-12-2001, 01:00 PM
Originally posted by jarvis
White knight...
I like how you have the
"0 Comment(s) Last comment was by Fred"
after your news posts. Did you use this hack to do that, or is there some other line of code that your are using? I would like to be able to do this at my site www.mhogaming.com
Thanks for the help!! :)
Accually the tag was in the code itself I just moved it to where i needed it. The biggest thing I had to remember is to put a \ in front of all the " color codes. Otherwise I would get a damn parse error..
Yes I am still new to php.. but lovin every minute of it
Dark_Wizard, I PMed ya back. :)
Suitcase, I don't see why you couldn't. You can copy and rename the the hack file to pluhnews2.php and configure it to whatever forum you wanted. That way you could have tons of different news forums if you chose.
The VBcode is still not working as of yet, White Knight, but I am taking that on. It should be included in the next release.
Keep the suggestions coming, I would love for this to have tons of features.
Another feature I was working on is categories. I have a 'rigged' version of categories on http://pluh.com if you want to see it. If that would be an interesting feature, let me know and I'll plug it in. Thanks!
garymill
07-13-2001, 10:43 AM
Not sure how to pull the news onto my main page from the news.php script.
I would appreciate your help in doing this.
Thanks,
Gary
RobAC
07-13-2001, 12:25 PM
Originally posted by garymill
Not sure how to pull the news onto my main page from the news.php script.
I would appreciate your help in doing this.
Thanks,
Gary
You need to use a server side include on your home page.
Well, unfortunately you cannot include the file on an index.html page.
The page has to be either .php or .phtml - whichever your server is configured to parse php code.
You can then include it like so:
<? include ("news.php"); ?>
Hope that helps.
garymill
07-13-2001, 12:30 PM
Thanks for everyone's help, after making the post, I thought that maybe an SSI would work.
This hack is really terrific, and you can see my site at
CyberMacro (http://www.cybermacro.com)
Gary
RobAC
07-13-2001, 12:39 PM
Well....it's running on my home page as an SSI and it works. And, my home page is an HTML document. :)
garymill
07-13-2001, 12:46 PM
Right Rob, in my last post I did not make it clear that it is working for my as an ssi on my html based front page.
Gary
White Knight
07-13-2001, 01:25 PM
Accually I am running mine on my index.html page. Via SSI. No problems as of yet.
rmusic
07-13-2001, 02:49 PM
sorry if this was answerd but
is there any news on getting vB code and line breaks to work yet ??
SuitCase
07-13-2001, 03:10 PM
Originally posted by Kayn
Suitcase, I don't see why you couldn't. You can copy and rename the the hack file to pluhnews2.php and configure it to whatever forum you wanted. That way you could have tons of different news forums if you chose.
That's good to know, thanks.
Originally posted by Kayn
Another feature I was working on is categories. I have a 'rigged' version of categories on http://pluh.com if you want to see it. If that would be an interesting feature, let me know and I'll plug it in. Thanks!
They look nice, but personally I wouldn't need them. I'm sure many others would, though... Maybe have it as a selectable option in the next release.
Oh, I just thought of something that's possible with this hack... A picture for each news post! All one would need to do is make an <IMG src="webhost.com/news/images/thumbnails/$threadid"> somewhere in the HTML, and perhaps have it link to another image with the $threadid for a full sized image. Hey, that's cool... Thanks for the hack, it's very flexible! :)
Originally posted by RobAC
Well....it's running on my home page as an SSI and it works. And, my home page is an HTML document. :)
Woa, I learned something new today about SSI's. :)
Line breaks and other stuff are on the way...
Dark_Wizard
07-13-2001, 03:24 PM
Kayn >>> Did you implement the time fix I sent you? Let me know what else I can help with....keep up the great work!
I wanted to let you all know that I'm going to try and have line breaks and VBcode working on Sunday, but that depends on how things go this weekend for me (I have a show on Saturday, and those are exhausting for me). ;)
Dark Wizard added some stuff and sent it over to me (which is really handy), so I'll be implemeting those additions as well. I'll keep you updated.
rmusic
07-13-2001, 03:33 PM
Originally posted by Kayn
I wanted to let you all know that I'm going to try and have line breaks and VBcode working on Sunday, but that depends on how things go this weekend for me (I have a show on Saturday, and those are exhausting for me). ;)
Dark Wizard added some stuff and sent it over to me (which is really handy), so I'll be implemeting those additions as well. I'll keep you updated.
good line breaks
im getting tired of <br>'s
jarvis
07-13-2001, 03:46 PM
Not to stray off-topic here, but...
RobAC,
That home page for you is HTML?!? It looks like a php portal of sorts.
White Knight
07-13-2001, 04:49 PM
Just some help from me if you want to do the ssi command. This is what I have on my website www.sportbikes.net
<!--#include file="forums/news.php"-->
parses in nicely
MarkB
07-14-2001, 01:00 AM
Great hack, exactly what I was after, and now I even have it working! :D
http://www.metaltours.com/
RobAC
07-14-2001, 02:43 AM
Originally posted by jarvis
Not to stray off-topic here, but...
RobAC,
That home page for you is HTML?!? It looks like a php portal of sorts.
It's pure html. I shaped it to look like php portal in appearance, but everything that's running on it that's forum related is through individual hacks.
jarvis
07-15-2001, 07:23 AM
It's pure html
Thanks for the reply, Rob.
I'm trying to do something similar as the:
"0 Comment(s) Last comment was by Fred"
on my page, but I really do not want to implement all of the features of PluhNews. I manually type in the articles and links and photos, but I would love to replace my "Discuss this post" with the above real-time counter.
The only way I see I'd be able to do it with PluhNews is to call an unique file for each article and manually specify the threadid's in each file, i.e. news1.php, news2.php, etc.
Any ideas, or would I have to go all or none in order to do this. My site is www.mhogaming.com so that you may see exactly what I am talking about.
Thanks!!
sysmom
07-15-2001, 12:14 PM
I installed this yesterday without any troubles and am ever so pleased with it.
Heck, even my boss is pleased with it!
Thank you!
Redmak
07-15-2001, 02:33 PM
There's an easy way to have vbcode and linebreaks and stuff interpreted by vbulletin so it shows up on your main news page.
Make sure the following line is added to the news script
require("./global.php");
To have the message parsed by vbulletin add the following:
$bericht=bbcodeparse2($pagetext,"1","1","1","1");
$bericht is now the formatted message
The 1's stand for "dohtml,dobbimagecode,dosmilies,dobbcode"
Enjoy :)
SuitCase
07-15-2001, 03:29 PM
Surely it can't be that easy, can it?
Redmak
07-15-2001, 03:31 PM
Yes it's that easy.
You bought vbulletin , might as well use it :)
Not to seem completely ignorant, but I am.. How would I use that with the file from this thread?
ztsky
07-15-2001, 06:30 PM
Originally posted by Redmak
There's an easy way to have vbcode and linebreaks and stuff interpreted by vbulletin so it shows up on your main news page.
Make sure the following line is added to the news script
require("./global.php");
To have the message parsed by vbulletin add the following:
$bericht=bbcodeparse2($pagetext,"1","1","1","1");
$bericht is now the formatted message
The 1's stand for "dohtml,dobbimagecode,dosmilies,dobbcode"
Enjoy :)
I have tried your said.but no way.
Redmak
07-15-2001, 06:49 PM
Ok a little explanation.
In news.php (located in my vbulletin directory)
Line 5 add the require statement
Add the $bericht= line right before the part where the html is put in (echo ")
Use $bericht instead of $pagetext in your html part
here's the output on my server http://www.neowin.net/index1.php
If things still dont work I'll post the complete news.php :)
Thank you! Works like a charm :)
rmusic
07-15-2001, 07:00 PM
Originally posted by Redmak
There's an easy way to have vbcode and linebreaks and stuff interpreted by vbulletin so it shows up on your main news page.
Make sure the following line is added to the news script
require("./global.php");
To have the message parsed by vbulletin add the following:
$bericht=bbcodeparse2($pagetext,"1","1","1","1");
$bericht is now the formatted message
The 1's stand for "dohtml,dobbimagecode,dosmilies,dobbcode"
Enjoy :)
im going to try that now
Steve Machol
07-15-2001, 07:01 PM
[QUOTE]Originally posted by Redmak
If things still dont work I'll post the complete news.php :)
This is it :)) Thank you so much Kayn and Redmak!
ztsky
07-15-2001, 07:15 PM
Originally posted by Redmak
Ok a little explanation.
In news.php (located in my vbulletin directory)
Line 5 add the require statement
Add the $bericht= line right before the part where the html is put in (echo ")
Use $bericht instead of $pagetext in your html part
here's the output on my server http://www.neowin.net/index1.php
If things still dont work I'll post the complete news.php :)
thanks,works well
but should Use $bericht instead of $pagetext in the whole file.;)
rmusic
07-15-2001, 07:24 PM
works perfect thank you red
Steve Machol
07-15-2001, 07:26 PM
[QUOTE]Originally posted by Bane
This is it :)) Thank you so much Kayn and Redmak!
SystemLogic
07-16-2001, 02:00 AM
Great hack! I'm gonna really love it when you have support for VBCode rather than HTML :)
Also, what about headlines?
I saw somebody have news source....how would I go about doing that?
webhost
07-16-2001, 03:20 AM
Great hack works very well and took less than 2 minutes to install.
Thank you very much
webhost
07-16-2001, 11:28 AM
Is there a way that you could have script check and pull from more than one forumid. Say pull from forums 3,4,5 instead of just forum 3 in this example.
If so how would a person do that?
Thanks
White Knight
07-17-2001, 01:36 PM
Well I tried to put in the added code but I am getting a parse error.
Fatal error: Call to undefined function: bbcodeparse2() in /usr/local/apache/htdocs/forums/news.php on line 85
any ideas? thank goodness for backups :)
Did you use the news.txt that I attached above as your news.php? Maybe you didnt add the require?
webhost
07-17-2001, 02:01 PM
Bane
Is there a way that you could have script check and pull from more than one forumid. Say pull from forums 3,4,5 instead of just forum 3 in this example.
Bane any ideas?
White Knight
07-17-2001, 02:13 PM
Stupid stupid stupid me..
yeah I forgot to put int he require field on line 5
I didnt use the name txt becuase I wanted to keep my old code for parsing.
All is working now. I hope kayn can pick this up and add it to his zip.
Thanks bane
White Knight - Glad you got it :)
Webhost - I really dont know..
Whew, sorry I was away for a few days. ;)
Okay, I'm going to go over all these additions and clean up the HTML code tonight most likely. I'll give credit where the credit is due!
As far as multiple news forums, I'll get cracking on that. Any suggestions on how to do this would be great.
Ohh, and headlines...I have a script for that too that I'll release with the next version! ;)
rmusic
07-17-2001, 02:30 PM
Originally posted by Kayn
Whew, sorry I was away for a few days. ;)
Okay, I'm going to go over all these additions and clean up the HTML code tonight most likely. I'll give credit where the credit is due!
As far as multiple news forums, I'll get cracking on that. Any suggestions on how to do this would be great.
Ohh, and headlines...I have a script for that too that I'll release with the next version! ;)
i tried and i get an error
Okay, I have the script almost ready. I need Dark Wizard to send me those little fixes he made to the time bug (I seem to have misplaced them the first time he sent it to me).
You can see everything functioning (except for the fixes Dark Wizard sent me) for the news (including VBcode, smilies, and line breaks) here: http://pluh.com/forums/PluhNews.php
And here is what the headlines look like: http://pluh.com/forums/PluhHeadlines.php
I'll be tweaking the HTML here and there as well.
webhost
07-17-2001, 03:49 PM
Kayn
I have the news.php working fine. I must have missed the headlines.php or is this something new you are working on?
Headlines is brand new to this script. I should be releasing it today - :)
Kayn, would it be possible for you to implement the ability to use a header and footer? I would rather not use this in a call if at all possible.
Hmm...
I now have it where it calls the configuration from a separate php file, but that's it.
Elaborate please?
Sorry, what I had meant is that instead of using an include from a shtml file, it could be used by itself by using a header and footer file. For example head.txt and foot.txt to set the page up and then the news files within it. so I could just put http://www.??.com/news.php and it would pull up the full page.
That would be easy...
You can include files inside the news script form separate new files, and it can be completely optional. Am I right?
If people would rather just include the news file on another page like it's set up now, they can. Sound right to ya?
Sounds downright perfect to me :)
SystemLogic
07-17-2001, 06:42 PM
I saw one sites example where he had a source site which showed up as a seperate field in his news posts....how would i go about doing that?
sysmom
07-17-2001, 06:50 PM
I'm using it as an include, and it worked flat out right the first time.
I especially LIKE using it as an include because I can hide the php source filename from public consumption. I wasn't particularly happy with the database name/password hanging out there. Yes, yes, I know, it's executed by the server, but now it's just that much harder to know where to look.
You should *see* the name I gave it... Heh.
And the page with the header and footer in it has a nice predictable page template named, news.shtml
:)
But there's no news.php in my directory...
-deb (only mildly paranoid...)
Dark_Wizard
07-17-2001, 09:14 PM
Kayn >>> I sent you the fixes again....check your email! I can also add the multiple forums for you if you want but would like to see what you have so far....actual code that is ;)
Actually, I think I've got that figured out! :)
I'm making some changes now...you'll see the new version out tonight.
New Version is out. Go to the first page to get it!
Thanks for all your help ya'll! :) :)
Originally posted by Kayn
(Thanks Dark Wizard and Bane)
The credit to me would be much better suited aimed towards Redmak, he is the originator of the codefix, I just slapped it in the file.
The script is looking good :)
Infinite
07-18-2001, 12:23 AM
Doesn't seem to work for me. I just get a white screen on both pluhnews.php and pluhheadlines.php
Richard
Dark_Wizard
07-18-2001, 12:36 AM
Did you make the necessary changes to PluhConfig.php?
Infinite
07-18-2001, 12:44 AM
This is my config file...
<?
//This is the Config file to get PluhNews running.
//**********************
//Set some Variables
//Retrieve news from the correct forum, which is the forumid
$newsforums = 32;
//Number of news items to show at once
$newsitems = 10;
//Path to your forums directory (leave out trailing slash)
$forumspath = "/vb";
?>
Dark_Wizard
07-18-2001, 12:48 AM
Can I have a URL?
Steve Machol
07-18-2001, 12:52 AM
[QUOTE]Originally posted by Infinite
This is my config file...
$forumspath = "/vb";
?>
Infinite
07-18-2001, 12:56 AM
Well, I tried two different paths. One of which was /public_html/vb and just /vb. Neither worked.
I'd give you a link, but my server just went down. VenturesOnline is changing hardware apparently.
But the link to the vb is www.ripthemic.net/vb
Pluh News is www.ripthemic.net/vb/pluhnews.php
Headlies is www.ripthemic.net/vb/pluhheadlines.php
Think that should do it.
I'll try and get the full path, smachol, when the board comes back up. I figured that'd be my last step to get this working.
Richard
Infinite
07-18-2001, 02:11 AM
Works now, there was a capitalization error. In WSFTP I like to have all remote extensions forced as lower case...I was trying it as lower case when it had to be uppercase.
Richard
Funny how picky php is...
I learnt that the hard way. :)
Redmak
07-18-2001, 04:29 AM
You don't need to add the require admin/config bit since this is already done by global.php
Also global.php connects to the mysql database so your connection isn't really necessary. Just use $DB_site instead of $db
Great little news add-on you got here :)
Thnx for the credit Bane :)
RobAC
07-18-2001, 04:34 AM
I agree....for some reason, it doesn't look to good in Netscat though. If you have more than 5 news items, for some reason, the font goes haywire.
SystemLogic
07-18-2001, 04:45 AM
Some reason it's not processing the required's in mine
Fatal error: Failed opening required './admin/config.php' (include_path='') in /path/to/boards/global.php on line 66
any ideas?
sysmom
07-18-2001, 04:56 AM
[QUOTE]If you have more than 5 news items, for some reason, the font goes haywire.
SystemLogic
07-18-2001, 05:02 AM
im positive that's not an issue
I will check for bugs with the HTML. The issue is that the loop is spitting out the HTML in a strange manner. I think...
I'll work on updating that unnecessary require (thanks!)
TWTCommish
07-18-2001, 06:13 PM
Sorry, I posted this elsewhere, but think it might be better here:
--------------------------
Hmmm, something's wrong. I started getting errors, so I tried to use chdir() to fix them. Here's what I'm using now. I have these two lines:
chdir("/usr/home/web/path/to/forums");
require("/usr/home/web/path/to/forums/global.php");
And then, I do this:
$comments = bbcodeparse2($comments,"1","1","1","1");
I get this error:
Fatal error: Call to a member function on a non-object in /usr/home/web/path/to/forums/admin/functions.php on line 75
Any idea what's wrong? Thanks for your help either way! :)
webhost
07-18-2001, 08:49 PM
ok guys couple of questions I have hack installed and it is running alright. Questions?
1)On the news page at the bottom when you select view all
posts should it pull up the entire forumid that you have set or
just new post in that forumid? Mind pulls up the entire forumid.
2) Is there a way to put a link on the headlines page that will
bring up the news page.
3) With this version are we able to pull from more than one
forum if so how?
4) Would there be away to add current active users in the forum
on the headlines page?
Thanks For the hack
Originally posted by webhost
ok guys couple of questions I have hack installed and it is running alright. Questions?
1)On the news page at the bottom when you select view all
posts should it pull up the entire forumid that you have set or
just new post in that forumid? Mind pulls up the entire forumid.
2) Is there a way to put a link on the headlines page that will
bring up the news page.
3) With this version are we able to pull from more than one
forum if so how?
4) Would there be away to add current active users in the forum
on the headlines page?
Thanks For the hack
1) I set it up to pull up the entire forumid. 'View all News' was meant to just be a link to the news forum that was specified. :)
2) Sure is. You have to go in and add the HTML. If you need specifics on how to do this just let me know.
3) Multiple news forums is currently in the works. It's a good idea to have...
4) That is an entirely different hack that I use on my page (http://pluh.com - under latest reviews). I forget exactly where to get it, but this hack is available somewhere in these forums. Try searching for it. If you can't find it, email me and I'll send you the code. :)
Originally posted by TWTCommish
Sorry, I posted this elsewhere, but think it might be better here:
--------------------------
Hmmm, something's wrong. I started getting errors, so I tried to use chdir() to fix them. Here's what I'm using now. I have these two lines:
chdir("/usr/home/web/path/to/forums");
require("/usr/home/web/path/to/forums/global.php");
And then, I do this:
$comments = bbcodeparse2($comments,"1","1","1","1");
I get this error:
Fatal error: Call to a member function on a non-object in /usr/home/web/path/to/forums/admin/functions.php on line 75
Any idea what's wrong? Thanks for your help either way! :)
Hmm...I'm stumped...
It should work. Anyone else here have suggestions?
webhost
07-18-2001, 09:31 PM
chdir("/home/username/public_html/forums/");
require("./global.php");
Guessing you might try something like this and replace username with yours for your ftp account.
Maybe?
Dark_Wizard
07-18-2001, 10:13 PM
With this version are we able to pull from more than one
forum if so how?
This would work well with categories in that each forum would be a category....I think I have some code from awhile back when I started this and never completed it...hmmm (as he looks through his files)...I'll get back to you on this ;)
webhost
07-18-2001, 10:17 PM
Thanks, Wanting to pull from about 7 or 8 forumid's.
Joey
Forgot a question?
Is it possible to somehow incorporate the include script in the install.txt into a html document. Tried putting it in there but it didn't wotk very good. Would like to pull the new files from one website to another site if possible?
webhost
07-19-2001, 02:26 AM
Another recommendation.
Say you have your news script setup to pull 10 messages or 40 . Any way say when someone views this page is there away to add views back to total view counts for each thread on the list back in the forum columns . I need this if possible to keep up with views.
???
yes yes, all of that is possible. I can put this on a 'request' list if you like for the next release!
webhost
07-19-2001, 02:41 PM
yes yes can not wait.
Thank You
webhost
07-20-2001, 10:43 AM
is it possible to setup the PluhHeadlines on a different domain rather than your own where some other site could pull the headlines from you?
I think you can. Try this:
<? include("http://thenameofyourdomain.com/nameofforums/PluhHeadlines.php"); ?>
:)
webhost
07-20-2001, 03:05 PM
try mind if you don't mind and see if it works
http://www.realwebhost.net/forums
or you might try http://forums.realwebhost.net
jarvis
07-22-2001, 02:00 AM
Okay, I've really been wanting to get something like this. I'm not so interested in the thread creation part of this hack, but I am really wanting to link to my threads from my home page and be able to display information like the following:
"e.g. www.mhogaming.com News article here"
20 comment(s) Last post by Jarvis
I would think that there is a line of code from this hack that I should be able to use and just manually put in the forumid and thread strings, but my question is, where would I have my MySQL user information to pull this data. My main page is HTML-based, but PHP-parsed. I'm a bit nervous about embedding my user information in my homepage. Can this or any other hack do what I am asking?
Newbie questions I'm sure, but any help is greatly appreciated!!!
Thanks!!
webhost
07-22-2001, 02:03 AM
This works had someone try it today with mind.
<? include("http://thenameofyourdomain.com/nameofforums/PluhHeadlines.php"); ?>
jarvis
07-22-2001, 02:30 AM
Thanks Webhost,
That solution would give me an output to my mainpage of all the articles in one particular forum, correct?
What I am wanting to do is have something that points to one specific thread in any forum. I am okay with having to manually enter the forum and threadids in the string of code which could do this. All of the news items on my site are manually entered by myself or one other, and what I was hoping was something that points to that thread from my home page (i.e. the "Discuss this Post" that I am already using) but also give the last poster and # of posts in that thread.
One way I was thinking of tackling this was that I could have an individual phunews.php (i.e. news1.php, news2.php, etc) for EACh article I post, but it seems that there would be a line of code that I could use for every post, and just manually type in the forumid and threadid specific to that news item that I have already created.
Hopefully I'm getting my needs across, but I feel like I'm talking in one huge circle. :)
Thanks!
webhost
07-22-2001, 02:54 AM
Yea I asked earlier in this post about be able to pull from more than one forum at time. They stated they were working on that. I think if that could be done then what you want should be achiveable. Look back in the post and ask one of the guys that put this hack together. They might be able to help. Got my hands full now with a calendar hack I am working on.
Joey
There is 9 hours time difference between me and where my website is hosted. vBulletin has a setting like that so that the time is displayed correctly. Could you please help to solve the time difference issue in PluhNews between the server and client. I hope I could explain my problem.
Thanks
Kengan
07-23-2001, 06:10 AM
Originally posted by Kayn
UPDATED! Woohoo!
I just fixed/added stuff from version 1.0!
Download the new version 1.5 if you have the old 1.0 - lots of better features.
From the readme.txt:
You can check out the raw demo here for PluhNews: http://pluh.com/forums/PluhNews.php
And Headlines! http://pluh.com/forums/PluhHeadlines.php
Let me know if you like it! (Thanks Dark Wizard and Bane)
Wonderful script !! keep it up for your good work ! Thanks ! ;)
SystemLogic
07-23-2001, 12:45 PM
I've converted our staff new at http://www.systemlogic.net to PluhNews, using PluhHeadlines.
I would like to do the same with our tech news, but like I said before, how can you create a source. I saw another site with it....
White Knight
07-23-2001, 01:12 PM
By popular request I am going to post the code I used for my news posting. I have had about 20 emails asking me for it so I figure I will archive it here. I am no way a php coder. This was just placing "cookies?" where i needed them.
Demo at http://www.sportbikes.net
// **********************
//Edit the HTML here (keep in mind that any double quote requires a backslash in front of it)
$bericht=bbcodeparse2($pagetext,"1","1","1","1");
echo "
<table bgcolor=#003366 border=0 cellpadding=3 cellspacing=1 width=\"100%\">
<tbody> <tr bgcolor=\"#000066\">
<td width=\"100%\"><font color=#ffffff face=arial,tahoma,verdana size=2>
<a href=\"$forumspath/showthread.php?s=&threadid=$threadid\"><b>$title</b></a> - <a href=\"$forumspath/showthread.php?s=&threadid=$threadid\">$replycount Comments</a><br>
Posted By <a href=\"$forumspath/member.php?s=&action=getinfo&userid=$postuserid\">$postusername</a> at $dateposted</b>
</center></font></td></tr><tr bgcolor=\"#000000\"> <td width=\"100%\"><font color=#ffffff face=arial,tahoma,verdana size=2>
</a>$bericht<center><br><a href=\"$forumspath/showthread.php?s=&threadid=$threadid\">$replycount Comment(s) Last comment was by <b>$lastposter</b></center></font></font></td></tr></tbody></table>
";
}
}
Kengan
07-24-2001, 08:39 AM
I have just set it up ! and it show nothing. I think may be the <?
//This is the Config file to get PluhNews running.
//**********************
//Set some Variables
//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 = "";
?>
What should I put on $forumspath= ? My fourm files is under the root domain ( www.adb.com ) all index.php is under www.abc.com not www.abc.com/forum
is there any idea ?
Thanks !:confused:
Pie'oh'pah
07-24-2001, 09:54 AM
nice :)
Kengan, Try putting a slash "/" for that. It should work.
webhost
07-26-2001, 10:23 PM
Kayn
Any word on the features to be able to pull from more than one forumid?
Great hack
Dark_Wizard
07-26-2001, 10:25 PM
Hmmm...are you working on this Kayn? If not I can easily do it for you....;)
Kengan
07-27-2001, 02:19 AM
Can you hack like this too ?
http://woody.molofox.net/inline6/
I like part of the feature here !!
sysmom
07-27-2001, 05:27 AM
Kengen:
Yes, PluhNews could be configured to look like that, or almost anything else.
You'll just have to adjust the HTML output lines in it.
I modified it a lot before I installed it, and the boss was very pleased when he looked at it. He said adopt it. :)
deb
Kengan
07-27-2001, 06:12 AM
Originally posted by SysMom
Kengen:
Yes, PluhNews could be configured to look like that, or almost anything else.
You'll just have to adjust the HTML output lines in it.
I modified it a lot before I installed it, and the boss was very pleased when he looked at it. He said adopt it. :)
deb
I see ! that is neat !!
Hey, if all of you using PluhNews could send me a link, I would love to see that!
Please post it here: http://pluh.com/forums/showthread.php?s=&postid=8830
Thanks. ;)
Originally posted by webhost
Kayn
Any word on the features to be able to pull from more than one forumid?
Great hack
I've been busy pretty much 24/7 and haven't been able to look at it lately. But it's on the list!
badmeetsevil-
07-27-2001, 11:18 PM
Kayn.. I can't seem to find where it says "Todays News" in the HTML code. Where is it? I'd like to remove it with an image.
Thanks.
Kengan
07-28-2001, 12:07 AM
Originally posted by Kayn
New Version is out. Go to the first page to get it!
Thanks for all your help ya'll! :) :)
Will you tell me where is new version ?
webhost
07-28-2001, 12:07 AM
badmeetsevil-
Look in PluhHeader.txt file;)
badmeetsevil-
07-28-2001, 12:19 AM
Yeah, I figured it out right before I came back here to reply. :) It was hidding in the PHP. The include that is.
IanMFT
08-05-2001, 01:29 PM
Yeah, well, i gotta bump this thread up because i need some help...My images (smilies are not showing and for the life of me, i can figure out how to fix this. Heres my PluhConfig.php file:
<?
//This is the Config file to get PluhNews running.
//**********************
//Set some Variables
//Retrieve news from the correct forum, which is the forumid
$newsforums = 48;
//Number of news items to show at once
$newsitems = 10;
//Path to your forums directory (leave out trailing slash)
$forumspath = "http://forums.mainframetech.net";
?>As you can see, my forums are at http://forums.mainframetech.net but the images come up as if they are in the images directory on the main site (www.mainframetech.net) instead of the forum site (forums.mainframetech.net). Anyone have any ideas on whats wrong here?
this is what ive been looking! does the script support vB 2.0.3?? the news appears but when i click on the links like Comments,Search or View i get a 404 error?? help? im just testing it on a test board till i get that fixed.. heres the link http://www.digital-host.net/~ruph/forum/PluhNews.php
I really need to get this working!
The only fix I can think if IAN, is to go to your admin for the VBulletin and change the paths to your images to something like:
/forums/images/smilies/whatever.gif
Hmm, I looked at ruph's page - it looks like something is wrong in your config. Double check and make sure the paths are right. :)
webhost
08-11-2001, 04:23 PM
Ok what I have done is just make 5 sets of this to pull from different forum id's. seems to work alright.
2 questions
First is there a way that when someone opens the news or headlines that it would automaically add to the thread view totals for the post that are included in the news or headlines page.
Second is there a way to add a reply button or link under each thread shown for someone to reply to the thread.
Rostor
08-12-2001, 04:40 PM
Hi,
this hack works fine...but I'v got some problems to configure more then 1 headlilne on my home page.
It continues to give me this error:
Fatal error: Cannot redeclare stripslashesarray() in C:\inetpub\wwwroot\swzone.it\forum\global.php on line 10
There is a way to solve it ?
Thx in advance.
Renato
this hack works fine...but I'v got some problems to configure more then 1 headlilne on my home page.
It continues to give me this error:
Fatal error: Cannot redeclare stripslashesarray() in C:\inetpub\wwwroot\swzone.it\forum\global.php on line 10
Any idea what's wrong? :confused: :confused: :(
webhost
08-16-2001, 01:12 PM
I followed hack instructions.
here is how mind looks http://www.realwebhost.net/PluhHeadlines.php
Pulsorock
08-17-2001, 10:42 PM
does this script works for VB 2.0.3?
sysmom
08-17-2001, 11:02 PM
It works in mine. :) And I've only got version 1 of the script going.
deb
ender
08-17-2001, 11:58 PM
Check this out: http://www.particlesun.com
It's based off the same concept, just looks different.
Pulsorock
08-31-2001, 04:46 AM
Great script
But I get this error when making a include of the headlines from the amin page (/index.php3)
[QUOTE]
Fatal error: Failed opening required './admin/config.php' (include_path='.:/usr/lib/php') in /var/www/pulsorock/foro/global.php on line 72
Rostor
08-31-2001, 07:33 AM
Hi Guillermo,
add this line before the require command:
chdir("yourpath/toforum/admin/config.php");
and this one to the end of the script:
chdir("yourpath");
Bye
Renato
Pulsorock
08-31-2001, 12:40 PM
Hi Rostor,
So I should add this linechdir("/var/www/pulsorock/foro/admin/config.php");
To the index.php located in the root folder of my web site before the include line and addchdir("/var/www/pulsorock"); at the end of the headlines script located in the /foro folder?
Thanks
Rostor
08-31-2001, 01:51 PM
ReHI :)
The line must be added in the first and the last lines of pluhHeadlines.php.
First part:
require("./global.php");
require("./PluhConfig.php");
chdir("/var/www/pulsorock/foro/admin/"); // <----- HERE
require("./config.php");
Last part:
mysql_free_result($sql_result);
mysql_close($connection);
chdir("/var/www/pulsorock"); // <---- HERE
Pulsorock
08-31-2001, 01:59 PM
ohh...
:)
I'll will try them now
Thanks for all the help
Rostor
08-31-2001, 02:01 PM
No Problem i'm here for other 3 hours :D:D:D lol
Pulsorock
08-31-2001, 02:14 PM
:(
I tried as you said, but now I get thi error:[QUOTE]
Fatal error: Failed opening required './global.php' (include_path='.:/usr/lib/php') in /var/www/pulsorock/foro/PluhHeadlines.php on line 6
Rostor
08-31-2001, 02:27 PM
Try to send me the file :)
helpguillermo@rostor.net ;)
Pulsorock
08-31-2001, 03:45 PM
Thanks!
It worked
:)
Bouddha
09-07-2001, 12:47 PM
this script is really good but I have a problem when I try to use this script twice on the same page.
In fact I need two headlines displaying on my homepage.
Each headline related to a distinct subforum.
So I use the script 2 times but I rename PluhHeadlines.php and Pluconfig.php for the second headline.
When I try I get this error for the second headline script :
Fatal error: Cannot redeclare stripslashesarray() in /forum/global.php on line 10
What can I do to fix this error ?
thank you in advance
vortech
09-07-2001, 05:00 PM
Is there any way to pull a date with this so it could look like this.
09-07-2001 05:54 PM - News Here - Posted By User name
Just want to be able to add the date to it.. Not a bug php guy so easier the better.. :)
webhost
09-07-2001, 05:10 PM
look here
<removed>
sysmom
09-07-2001, 07:31 PM
Is version 1.5 up in the first message the most recent version of PluhNews? :)
deb
Bouddha
09-07-2001, 08:45 PM
I found my error (see above), I just put in comment the require global.php in the PluhConfig.php and now I can run this script twice on the same page.
Goldfinger
09-13-2001, 10:27 AM
Ok this hack is GREAT, when i am logged on my board. But when i am logged out. i get this error
Warning: Cannot add header information - headers already sent by (output started at /path/to/index.php:10) in /path/to/admin/functions.php on line 1457
Note: it shows the direct path i didnt want to show it on here :) to save somewhat privacy. But anyone have any ideas on how to fix it? I am using 2.0.3.
You can view it at S-Files Online (http://sfiles.equaked.com)
Thanks :).
webhost
09-13-2001, 11:00 AM
I just ran into this on another hack. I found that it was because the database name and password was wrong, check your Pluhconfig file for proper settings
Goldfinger
09-13-2001, 11:19 AM
all the variables are right in the PluhConfig.
Goldfinger
09-13-2001, 08:37 PM
Still have the same problem Web. Even after you fixed it... i cleared my cookies. and it didnt work. but if im cookied it'll work..
P1aGu3
09-15-2001, 11:05 AM
Brilliant Script ... saved me alot of hairpulling and pain ...
I am getting the same header problem ...
My index is basicly a series of includes
<? include ("location/includes/header.php")?>
various html for table layouts
<? include ("forums/PluhNews.php")?>
various finishing html
<? include ("location/includes/footer.php")?>
P1aGu3
09-15-2001, 11:09 AM
I can already guess that the inclusion of the global.php and admin/config.php is causing the Vbulleting Header functions to kick in causing the conflict with my header.php.
But no idea how to fix it.
Goldfinger
09-15-2001, 11:22 AM
Actually the problem is with cookies. there is no header.php and footer.php
P1aGu3
09-15-2001, 11:28 AM
Hmmm ... thats a point ...
My error occurs on line 1459 ... which is "setcookie($name,$value,$expire,$cookiepath);" Below
// ###################### Start vbsetcookie #######################
function vbsetcookie($name,$value="",$permanent=1) {
global $cookiepath,$cookiedomain;
if ($permanent) {
$expire=time() + 60*60*24*365;
} else {
$expire = 0;
}
if ($cookiedomain) {
setcookie($name,$value,$expire,$cookiepath,$cookie domain);
} else {
setcookie($name,$value,$expire,$cookiepath);
}
}
Goldfinger
09-15-2001, 11:30 AM
I know for a fact its a cookie problem because when you are logged into your board it'll work. But when you delete your cookies from your browser it'll be messed up.
P1aGu3
09-15-2001, 11:33 AM
I think I know how to fix this (long time since I worked with cookies)
Add the following to the top of the index.
<?
require("forum/fnqglglob.php");
require("forum/fnqglconfig.php");
require("forum/admin/config.php");
?>
Before the require("layout/header.php");
The cookies from memory have to be loaded before the first < html > tag.
Mind you my memory is sad.
Goldfinger
09-15-2001, 11:35 AM
doesnt work.
P1aGu3
09-15-2001, 11:35 AM
Yep ... fixed it ...
On my index I simply added the 3 includes before my header include.
Cookies have to be loaded prior to the first < html > tag (I am positive, but quite often wrong)
P1aGu3
09-15-2001, 11:39 AM
Originally posted by Goldfinger
doesnt work.
Hrm ... wierd ...
Worked on my end ...
Those includes must be loaded before ANY html is parsed.
Goldfinger
09-15-2001, 11:40 AM
try deleting your cookies. because it wiill work if logged onto your board. cause your coookies are still there.
P1aGu3
09-15-2001, 11:47 AM
I did ... closed browser the works ...
It fixed it for me ...
http://www.fnqgl.com/testindex.php You can go there for a test.
Goldfinger
09-15-2001, 11:51 AM
require("forum/fnqglglob.php");
require("forum/fnqglconfig.php");
those 2 files which are they for the average person.
P1aGu3
09-15-2001, 11:58 AM
fnqglglob.php is a copy of global.php edited with absolute references to admin/config.php
fnqglconfig.php is a copy of the admin config (which didnt work, and I havent deleted yet)
I am guessing it didnt work for you ...
Bugger ...
I deleted the cookies, and closed the browser (i.e.6 delete cookies) and it didnt cause that.
*looks into it further*
Goldfinger
09-15-2001, 12:05 PM
Fatal error: Cannot redeclare stripslashesarray() in /path/to/sfiles/forum/global.php on line 11
i edited the path for privacy ;).
thats the new error i get after i add the paths to these.
P1aGu3
09-15-2001, 12:06 PM
Hmmm ... thats a new one for me
webhost
09-15-2001, 12:10 PM
Is this what you guys are trying to do?
http://www.realwebhost.net/PluhHeadlines.php
or something else
P1aGu3
09-15-2001, 12:11 PM
No, including PluhNews.php into a php index page that already generated the HTML headers before the PluhNews.php inclusion (thus causing problems with vB cookies)
Goldfinger
09-15-2001, 12:13 PM
goto back to the previous page it'll explain the problem.
webhost
09-15-2001, 12:20 PM
Guys go to your control panel under options and look for this.
Cookie Domain
The domain on which you want the cookie to have effect. If you want this to affect all of yourhost.com rather than just forums.yourhost.com, enter .yourhost.com here (note the 2 dots!!!). Can be left blank.
This may help
P1aGu3
09-15-2001, 12:28 PM
I am pretty certain I have it sorted on my end ... I have got a half dozen friends to check it and its working no problem for them.
I think the .domain.com fixed it.
Thanks
Goldfinger
09-15-2001, 12:32 PM
stilll doesnt work for me. this is making me mad.
P1aGu3
09-15-2001, 12:37 PM
Which error are you getting ... still the header, or the stripslash ?
Goldfinger
09-15-2001, 12:38 PM
header error.. .. the only reason i was getting stripslash was because i was calling gobal.php and config.php twice. so like it didnt work..
P1aGu3
09-15-2001, 12:45 PM
Try adding the domain in like suggested .domain.com and then put the includes before any html in the file.
Delete the cookies and try again.
Cookies have to be processed prior to any html with PHP (checked on that, its a fact)
Goldfinger
09-15-2001, 12:48 PM
I think i fixed it :D. goto this link
http://sfiles.equaked.com/
P1aGu3
09-15-2001, 12:50 PM
Lookin sweet to me ... no errors that I can see
:D
What was it ?
webhost
09-15-2001, 12:50 PM
Great! I bet you are happy
Goldfinger
09-15-2001, 12:53 PM
i dunno.. i just required the global.php before my <html> tag and deleted the require global.php from PluhNews.php and did that domain cookie thing and it works :).
Goldfinger
09-15-2001, 12:53 PM
Yes i am very happy thanks for all the help guys. :)
P1aGu3
09-15-2001, 12:54 PM
Yep, thats exactly what I did
:D
Cookies are evil dammit ... but they make life much easier than typing the username/password each time you visit :D
P1aGu3
09-15-2001, 12:55 PM
webhost, thanks for the cookie domain suggestion :D
Goldfinger
09-15-2001, 12:55 PM
yes i think cookies were created by the devil. and are possesed. :)
usbnuts
09-16-2001, 06:10 PM
Do you what is causing the header problem?
webhost
09-16-2001, 06:35 PM
usbnuts
Go back and read the last 15 post's you will see how to fix the problem you are having.
Goldfinger
09-17-2001, 11:55 AM
How can you make it so it only shows the last 4 headlines and still shows the last 10 news items? Cause i dont want it to show ALL of the headlines.
usbnuts
09-17-2001, 06:29 PM
u have to define the two mySQL queries with different LIMIT value.
Bouddha
09-18-2001, 07:56 PM
I use the PluhNews on my homepage and I would like to "ameliorate" it. I would like to log on my homepage and see new or updated news (pluhnews) with the arrow of the board.
require("./forum/global.php");
if ($bbuserinfo['userid']!=0) {
$username=$bbuserinfo['username'];
print("<p align='center'>Welcome back,<br /> <b>$username!</b></p>");
print("<p align='center'><b>[ <a href='forum/index.php'>Enter</a> ]</b></p>");
} else {
?>
<form action="http://www.site.com/forum/member.php" method="post" />
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="action" value="login" />
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="left"><font class="verdana, arial, helvetica" size="1"><b>Username:</b></font></td>
<td align="left"><input type="text" name="username" size="7" /></td>
</tr>
<tr>
<td align="left"><font class="verdana, arial, helvetica" size="1"><b>Password:</b></font></td>
<td align="left"><input type="password" name="password" size="7" /></td>
</tr>
<tr>
<td align="center" colspan="2"><input type="submit" value="Login!" /></td>
</tr>
</table>
</form>
<?
}
?>
this small code (see hacks for version 2.x) allow to login on a non VB page. When you log, you go on the index of forum.
I would like to stay on the homepage and view the news for my session.
I hope you understand what I said ;)
Thx in advance for help
IanMFT
09-19-2001, 05:37 AM
Ok, 1 problem and one request
PROBLEM
The PluhHeadlines.php file seems to be constantly connected to my forums as seen here:
http://www.mainframetech.net/screencaps/headlines.gif
This is wierd, any ideas as to why this would be happening?
REQUEST
Ok, if I turn off my board, here is how a section of my front page looks:
http://www.mainframetech.net/screencaps/borked.gif
It would be awesome if it would display a little message if the board was turned off instead of getting the templates and stuff in there too...any ideas or suggestions?
thnx,
~Ian :)
SirSteve
09-21-2001, 07:22 PM
Nice hack but I need categories! I want to be able to pull the latest news from all forum categories!
Example
Forum (NEWS)
-Category 1
-Category 2
-Category 3
etc
A few things like, "E-mail this to a friend" and "Print View" would be cool as well.
usbnuts
09-21-2001, 10:25 PM
SirSteve,
I think you just have to change one line to grab any thread titles forum catergoies you want.
// create sql statement
$sql = "SELECT threadid, title, forumid, replycount, postusername, postuserid, lastposter, dateline, iconid FROM thread WHERE forumid = "1" AND forumid = "2" AND forumid = "3" ORDER BY dateline DESC LIMIT $newsitems";
Harry
09-23-2001, 03:16 PM
Anyone knows what to change, that not the complete Article, but after 100 or 200 letters it ends with a "...more..." linked to the complete article???
Craig Armstrong
09-29-2001, 09:26 AM
Originally posted by Harry
Anyone knows what to change, that not the complete Article, but after 100 or 200 letters it ends with a "...more..." linked to the complete article???
vB's screwing up the code, so I'll attached the instructions as a .txt file... :)
Here's a working demo: http://www.coldplayonline.com/forums/Test_PluhNews.php
SirSteve
09-29-2001, 01:13 PM
Originally posted by usbnuts
SirSteve,
I think you just have to change one line to grab any thread titles forum catergoies you want.
// create sql statement
$sql = "SELECT threadid, title, forumid, replycount, postusername, postuserid, lastposter, dateline, iconid FROM thread WHERE forumid = "1" AND forumid = "2" AND forumid = "3" ORDER BY dateline DESC LIMIT $newsitems";
I tried but it didn't work for me or I did something wrong...
:(
Craig Armstrong
09-29-2001, 06:01 PM
You could just install multipul PluhNews' on your server...
PluhConfig1.php
PluhNews1.php
PluhHeader1.txt
PluhFooter1.txt
PluhConfig2.php
PluhNews2.php
PluhHeader2.txt
PluhFooter2.txt
et cetera...
Just set up each one to pull the news from different forums, then include them wherever you want on any page.
Harry
09-29-2001, 07:14 PM
Thanks Craig, the ...more... thing works perfect, with the multiple Newsfiles I had the same idea :D also works.
SirSteve
09-29-2001, 10:39 PM
Originally posted by Craig Armstrong
You could just install multipul PluhNews' on your server...
PluhConfig1.php
PluhNews1.php
PluhHeader1.txt
PluhFooter1.txt
PluhConfig2.php
PluhNews2.php
PluhHeader2.txt
PluhFooter2.txt
et cetera...
Just set up each one to pull the news from different forums, then include them wherever you want on any page.
Seems like a lot of work. A more featured version of Pluh News would be better.
;)
Goldfinger
10-09-2001, 10:23 PM
here is a MINI im talkin lil modification i did to the headlines.php to make it display a selected number of headlines instead of showing the same amout as the news.
in pluhheadlines.php find:
// 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";
replace that with
//headline count
$headlines = "5";
// create sql statement
$sql = "SELECT threadid, title, forumid, replycount, postusername, postuserid, lastposter, dateline, iconid FROM thread WHERE forumid = \"$newsforums\" ORDER BY threadid DESC LIMIT $headlines";
and just put how many headlines you want to display in the $headlines variable :). Enjoy.
Wow, look at all these posts. :)
Sorry I've been gone, but I'm glad there are people using my little hack. :)
SirSteve
10-10-2001, 08:30 PM
Originally posted by Kayn
Wow, look at all these posts. :)
Sorry I've been gone, but I'm glad there are people using my little hack. :)
Time for some updated features?
:)
Hamma
10-10-2001, 08:35 PM
I want to use this hack. However theres allota stuff to read here hehe, would it be ok to use the stuff from the first page or were there bugs fixed?
Well, haven't messed with it in a while...
Post any suggestions that ya'll would think is necessary, or wanted, or whatever. :D
Hamma
10-10-2001, 09:45 PM
hmm, getting some odd errors:
Warning: Undefined variable: REQUEST_URI in
path\to\global.php on line 39
Warning: Undefined variable: QUERY_STRING in path\to\global.php on line 47
Warning: Undefined index: HTTP_POST_VARS in
path\to\global.php on line 64
Warning: Undefined index: action in
path\to\global.php on line 64
Warning: Undefined index: action in
path\to\global.php on line 67
Warning: Cannot add header information - headers already sent by (output started at path\to\global.php:39) in path\to\functions.php on line 1457
Today's News
However at the very bottom its posting my news.. is there somthin I missed? hehe
Goldfinger
10-10-2001, 09:47 PM
if you go back a couple pages you'll find out how to fix your header problem a whole bunch of us had that same problem :).
Goldfinger
10-10-2001, 09:49 PM
Originally posted by Kayn
Well, haven't messed with it in a while...
Post any suggestions that ya'll would think is necessary, or wanted, or whatever. :D
you should add my code fix in the headlines :). lol. its simple but yeah it is useful.
Hamma
10-10-2001, 09:52 PM
I read it but have a short term memory :p Ill dig back a bit hehe
Hamma
10-10-2001, 10:17 PM
Im getting that assortment of errors when I am logged in? I already have the cookie thing set. Also do I put those require commands on the index of the site itself where the news is included?
Hamma
10-10-2001, 10:50 PM
eh I cant get this thing to work for the life of me.
Goldfinger
10-11-2001, 01:38 AM
try including the admin/config.php and the global.php on your main page before the <html> tag. and than take them out of the pluhnews.php
Hamma
10-11-2001, 02:10 AM
hm when I do that it crashes.. My main page right now is .shtml is there anything I need to change beside adding those commands at the top and renaming it to .php? (i am somewhat new to PHP, just started toying with it recently)
I get a sweet assortment of errors :(
Hamma
10-11-2001, 11:42 AM
btw I dont remember ever seeing anyone entounter these ones:
Warning: Undefined variable: REQUEST_URI in
\path\to\global.php on line 39
Warning: Undefined variable: QUERY_STRING in
\path\to\global.php on line 47
Warning: Undefined index: HTTP_POST_VARS in
\path\to\global.php on line 64
Warning: Undefined index: action in
\path\to\global.php on line 64
Warning: Undefined index: action in
\path\to\global.php on line 67
then there is this one which is what I did see:
Warning: Cannot add header information - headers already sent by (output started at \path\to\vbulletin\global.php:39) in \path\to\vbulletin\admin\functions.php on line 1457
This is what I get when I include it on my index
Warning: Undefined variable: REQUEST_URI in
\path\to\vbulletin\global.php on line 39
Warning: Undefined variable: QUERY_STRING in
\path\to\vbulletin\global.php on line 47
Warning: Undefined index: HTTP_POST_VARS in
\path\to\vbulletin\global.php on line 64
Warning: Undefined index: action in
\path\to\vbulletin\global.php on line 64
Warning: Undefined index: action in
\path\to\vbulletin\global.php on line 67
Fatal error: Failed opening required './admin/config.php' (include_path='') in \path\to\vbulletin\global.php on line 72
This isnt fun anymore :(
Goldfinger
10-11-2001, 06:35 PM
in your global.php look for all the ./global and replace that with the full path to your global.php than it should work.
Goldfinger
10-11-2001, 06:37 PM
and your index should be a .php not .shtml because it cant phrase php . Try changing the file extension before you try changing all your paths in global.
Hamma
10-11-2001, 08:34 PM
Yea, I have tried most of that. I will try it again though. One thing is that my Index is located in a different DIR than the pluhnews.php would that make a difference?
Hamma
10-11-2001, 08:59 PM
I am getting closer now, I am now getting
Warning: Undefined variable: REQUEST_URI in
\path\to\global.php on line 39
Warning: Undefined variable: QUERY_STRING in
\path\to\global.php on line 47
Warning: Undefined index: HTTP_POST_VARS in
\path\to\global.php on line 64
Warning: Undefined index: action in
\path\to\global.php on line 64
Warning: Undefined index: action in
\path\to\global.php on line 67
And my news gets added at the bottom. BUT I have not seen these "QUERY_STRING" and all the other things mentioned anywhere else in this thread. \
When I do the require command at the top of my index page I get those errors at the very top above all the layout, no more header error though :)
Goldfinger
10-11-2001, 10:14 PM
also try putting your PluhNews in the same directory as your index.php seeing thats what the instructions say :).
Hamma
10-11-2001, 10:50 PM
Yep. Tried that :( (thats where it is now with these errors)
Hamma
10-12-2001, 09:32 PM
*bump*
Anyone have any ideas?
Goldfinger
10-13-2001, 12:56 AM
im fresh out of ideas.. maybe one of the real gurus can help you :).
WOOHOO!!
</Goldfinger is now a senior member :), 100th post >
Hamma
10-13-2001, 07:55 PM
*bump* again, someone help me :(
hehe
Hamma
10-15-2001, 10:45 PM
I figured it out, just deleted the code giving me errors and created a global2.php :)
Hamma
10-15-2001, 10:53 PM
Have another question though (as if u wanted to see my name again) Is there a way to include the Date at the top of that days news.. i.e.
October 15, 2001
blah - posted by Hamma @ 3:53PM
blahblah
Comments
Here is a link to the current page I am using now, and an example of how Id like to configure Pluhnews:
http://www.dragonwolves.com/index.shtml
pdatoon
10-23-2001, 03:14 PM
Originally posted by SystemLogic
I've converted our staff new at http://www.systemlogic.net to PluhNews, using PluhHeadlines.
I would like to do the same with our tech news, but like I said before, how can you create a source. I saw another site with it....
Anybody has an answer for that?
Possible to have categories?
rkettner
10-31-2001, 04:04 AM
I fixed everything until I didn't get any more path error messages, but nothing is included :(
http://www.wiredguy.com/test.php
rkettner
10-31-2001, 04:41 AM
If you look at the HTML, you can see the browser stops reading the source code once it hits the include. What's up with that?
rkettner
10-31-2001, 04:20 PM
If you visit the page in a browser, nothing shows up either:
- http://www.wiredguy.com/forums/PluhNews.php
What's going on?
rkettner
11-01-2001, 03:40 PM
I'm pleased to announce.... it works!!! :)
DarkReaper
11-12-2001, 09:03 PM
Does this work with 2.2.0?
Hamma
11-23-2001, 06:06 PM
Yes.
Mac Write
11-23-2001, 09:46 PM
if I go to /forums/Pluhcomments.php (I named it that for a differrent use on my site) it works fine, but if I include it in a php file in a /folder/ as
<?php Include ("/forums/Pluhcomments.php"); ?>
I get the following
Fatal error: Failed opening required 'global.php' (include_path='.:/usr/lib/php') in /pathnamedeletedl/forums/Pluhcomments.php on line 5
So what do I change so that I don't get this error?
I also included the pluhconfig in the comments.php script I am changing since I want it to display the info for a certain thread (I will hard code the thread ID into each article and include the comments.php)
This is a great Hack Perfect. Or better yet, if you could post the code to do this
X Comments last post by user" line only and then set it so that I can have a var $threadid= that I have in the article that it grabs to tie the above to the thread for the article?
thanks
Mac Write
11-23-2001, 11:44 PM
Ok I moved the require global/admin to the test page, and now I am getting
Warning: Access denied for user: 'root@localhost' (Using password: NO) in /pathdeleted/forums/Pluhcomments.php on line 17
Warning: MySQL Connection Failed: Access denied for user: 'root@localhost' (Using password: NO) in pathdeleted/forums/Pluhcomments.php on line 17
Cannot connect to server.
??? what am I doing wrong?
I added .mydomain.mydomain.org to the cookies this (changed name of real domain).
So what am I doing wrong? I am still completely new to PHP.
HELP!!!!!!!!!!!!!
Mac Write
11-24-2001, 01:16 AM
Back to square one.
I want to Include PluhHeadlines.php on each article page. All articles are in a /folder off main site.
So I do
Virtual ("/forums/PluhHeadlines.php")
So then I remove the
require("./global.php") require("./admin/config.php");
and put them @ the top of my test page which is in
www.mysite.com/critcalmass/some-article.php
Now I get the Error
Fatal error: Failed opening required './global.php' (include_path='.:/usr/lib/php') in /path/to/site/html/criticalmass/airport-made-for-mac-os-x.php on line 1
I also tried it with /forums/global.php and still no go
What am I missing? I am still completely new to PHP.
As I was writing this, I tried using Absolute paths, and it works. I have implemented the headlines.php to replace my "This Week @Mac Write" at the top of all pages.
Now to try out the Pluhnews.php but This afternoon it's 3AM and I need to get sleep (or finish watching TRUE LIES?)
amykhar
11-24-2001, 07:38 PM
Here's a minor improvement to the hack that will allow you to use more than one forum as your source for news. :)
In PluhNews.php Find:
$sql = "SELECT threadid, title, forumid, replycount, postusername, postuserid, lastposter, dateline, iconid FROM thread WHERE forumid = \"$newsforums\" ORDER BY threadid DESC LIMIT $newsitems";
Replace with:
$sql = "SELECT threadid, title, forumid, replycount, postusername, postuserid, lastposter, dateline, iconid FROM thread WHERE forumid IN ($newsforums) ORDER BY threadid DESC LIMIT $newsitems";
in PluhConfig.php you can now add multiple forums, surrounded by quotes and separated by commas:
example: $newsforums = "72,76";
I haven't tested the headlines script, but it goes like this:
In PluhHeadlines.php Find:
$sql = "SELECT threadid, title, forumid, replycount, postusername, postuserid, lastposter, dateline, iconid FROM thread WHERE forumid = \"$newsforums\" ORDER BY threadid DESC LIMIT $newsitems";
Replace with:
$sql = "SELECT threadid, title, forumid, replycount, postusername, postuserid, lastposter, dateline, iconid FROM thread WHERE forumid IN ($newsforums) ORDER BY threadid DESC LIMIT $newsitems";
Amy
amykhar
11-24-2001, 07:45 PM
This "tweak" is for people who installed fastforward's spider friendly urls.
In PluhNews.php Find:
//gotta convert that damn unix time crap
Add BEFORE:
$linkcode = "$forumspath/t".$threadid .".html";
Find:
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>
";
Replace with:
echo "
<a href=\"$linkcode\"><b>$title</b></a> - <a href=\"$linkcode\"><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=\"$linkcode\"><b>$replycount</b> $commenttext</a> Last comment was by <b>$lastposter</b></center><hr noshade height=\"1\" width=\"60%\"><p>
";
DarkReaper
11-24-2001, 08:09 PM
Cool additions. I've got an idea though:
What about allowing a paramater to be passed. For example, pluhnews.php?site=site1 would give news for the forum designated as "site1."
amykhar
11-24-2001, 08:32 PM
I THINK you can do that by removing the variable $newsforums from the config file and then passing it in as the parameter.
newsforums=1 for example.
Amy
Mac Write
11-25-2001, 12:30 AM
I have
"X Comments posted by XXXX" I want to manually enter the thread ID that this link, and the thrad it pulls the info from.
So what do I change to fix it?
amykhar
12-01-2001, 05:17 PM
I did quite a bit of editing on this to get it to work with more than one inclusion of PluhNews.php on the same page. However, it's finally working here:
http://www.easilyaddictive.com
This is really a powerful hack with a lot of possibilities.
Amy
DarkReaper
12-01-2001, 05:32 PM
What'd you do? And would you be willing to release the modifications?
amykhar
12-01-2001, 05:47 PM
I removed the require global.php and admin/config.php from the script.
Then, I modified the queries to use VBulletin functions.
I added the ability to put a <pagebreak> tag in the article so that it will break where you want it to.
My version also uses search engine friendly URLs, but I removed that from this one for you guys.
I have included pretty close to my version. (minus the url changes). To use it, require global.php and admin/config.php in the CALLING script.
Make a copy of this script and a copy of the config script for each instance that you want to include on your page. Edit the news script to point to the proper config script.
Amy
TheUnforgiven
12-12-2001, 07:55 PM
simple not if you don't want to escape all your " just delete the echo line and do this
?>
Your stuff here <?= $somevvar?>
<?
thats what i did
I just got back to this board, oh man, didn't know my hack was growing so much. :)
Hey Amy, could you send me your modifications? I've been really busy with my projects that I haven't had time to really work on PluhNews.
Plus, any other modifications that people have made that improved PluhNews, please send 'em
kayn@pluh.com
Thanks!
amykhar
12-13-2001, 05:03 PM
It's in the mail. :)
Amy
Ok, here's my question. This pluhnews program seems to list the most recent THREADs created in a forum. I was hoping to get it to list whatever the most recent thread TOPIC postings are. What I mean is, I'd like to have it load the 5 threads that have the 5 most recent posts on my board.
In my General/Anything goes forum, I have it set so that whatever the most recent topics are.. that they float to the top of the forum (which is what I think most people are doing with their vB boards). I'd like my pluhnews to grab those most recent 5 threads and show them (not the most recent 5 newly created threads regardless of when the last post was on that thread as it pluhnews now does).
Can this be done? I'm guessing that maybe all that I need to do is change some variables in my Pluhconfig.php file? Can anyone help me with some advice on this? Thanks. :)
My other question is about using the posts that this program pulls as Highlights to drive more traffic to my board as opposed to having this program show the entire post. What I'm trying to get is the same effect like over on the Yahoo clubs boards if anyone is familiar with the way those work. What they have over there is when you visit a club, the most recent 5 messsges show with: the Headline of the message, the name of the poster, the Date of the posting, (and here's the tricky(?) part....), the first sentence or so of the text of the post (not the entire post).
Check out this club on Yahoo to see what I'm talking about
http://clubs.yahoo.com/clubs/thelastline
See how this welcome page over at this Yahoo club shows a "highlight" of the 5 most recent messages?
Is there any way this can this be done with this PluhNews program?
First off ... the PluhNews would have to get the 5 most recent thread posts based on date (not just get the 5 most recently created threads as it does now).
Secondly, is there a way to have this program only show the first sentence or so of the text in the post?
Yeah, all of that stuff is possible. :)
All it would really be is a few more queries and some string manipulation.
I'm taking notes and will work on it for the next version of PluhNews. :)
yulee
12-14-2001, 11:30 PM
Hello there!
I need a bit help :)
I'm going to install my vbulletin forum in a different subdomain than where I'm going to show the news. Could you help me to have it? I hope it could be done, but sure I'm waiting your replys because I don't want to miss my license.
My idea is publishing news in http://www.mydomain.com/index.php and have the forum in http://forum.mydomain.com. So I'm going to put the last url in my license.
Any ideas how could I include the files?
Thank you very very much. You are a very helpful people!! :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.