PDA

View Full Version : PluhNews 1.5

Pages : [1] 2 3

Kayn
03 Jul 2001, 17:51
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.

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,

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

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
03 Jul 2001, 20:30
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
03 Jul 2001, 20:32
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?

Kayn
03 Jul 2001, 21:31
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
04 Jul 2001, 02:13
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

Kayn
04 Jul 2001, 03:30
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
09 Jul 2001, 22:25
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!

Kayn
09 Jul 2001, 23:01
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
11 Jul 2001, 02:04
Just another suggestion. It would be great if this hack was able to parse vb code. :)

TechTalk
11 Jul 2001, 02:35
Be easier to just recreate printthread.php IMHO

Kayn
11 Jul 2001, 14:12
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
11 Jul 2001, 18:37
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
11 Jul 2001, 18:50
this looks great just needs parsing of vB code & smilies and sent to friend link and you're set :D

jarvis
11 Jul 2001, 19:59
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!! :)

Kayn
12 Jul 2001, 01:39
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
12 Jul 2001, 01:47
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
12 Jul 2001, 09:48
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
12 Jul 2001, 13:58
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
12 Jul 2001, 14:00
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

Kayn
12 Jul 2001, 16:19
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
13 Jul 2001, 11:43
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
13 Jul 2001, 13:25
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

Kayn
13 Jul 2001, 13:26
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
13 Jul 2001, 13:30
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
13 Jul 2001, 13:39

garymill
13 Jul 2001, 13:46
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
13 Jul 2001, 14:25
Accually I am running mine on my index.html page. Via SSI. No problems as of yet.

rmusic
13 Jul 2001, 15:49
sorry if this was answerd but

is there any news on getting vB code and line breaks to work yet ??

SuitCase
13 Jul 2001, 16:10
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! :)

Kayn
13 Jul 2001, 16:21
Originally posted by RobAC

Woa, I learned something new today about SSI's. :)

Line breaks and other stuff are on the way...

Dark_Wizard
13 Jul 2001, 16:24
Kayn >>> Did you implement the time fix I sent you? Let me know what else I can help with....keep up the great work!

Kayn
13 Jul 2001, 16:31
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
13 Jul 2001, 16:33
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
13 Jul 2001, 16:46
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
13 Jul 2001, 17:49
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
14 Jul 2001, 02:00
Great hack, exactly what I was after, and now I even have it working! :D

http://www.metaltours.com/

RobAC
14 Jul 2001, 03:43
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
15 Jul 2001, 08:23
It's pure html

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
15 Jul 2001, 13:14
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
15 Jul 2001, 15:33
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 15 Jul 2001, 16:29 Surely it can't be that easy, can it? Redmak 15 Jul 2001, 16:31 Yes it's that easy. You bought vbulletin , might as well use it :) Bane 15 Jul 2001, 19:26 Not to seem completely ignorant, but I am.. How would I use that with the file from this thread? ztsky 15 Jul 2001, 19:30 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
15 Jul 2001, 19:49
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 :) Bane 15 Jul 2001, 19:57 Thank you! Works like a charm :) rmusic 15 Jul 2001, 20:00 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
15 Jul 2001, 20:01
Originally posted by Redmak
If things still dont work I'll post the complete news.php :)

I'm having difficulty with this. I'd appreciate the complete script. Thanks.

Bane
15 Jul 2001, 20:08
This is it :)) Thank you so much Kayn and Redmak!

ztsky
15 Jul 2001, 20:15
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 15 Jul 2001, 20:24 works perfect thank you red Steve Machol 15 Jul 2001, 20:26 Originally posted by Bane This is it :)) Thank you so much Kayn and Redmak! Thanks! I swear I had the exact same additions but my version didn't work. Anyway this one is working. :) SystemLogic 16 Jul 2001, 03:00 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 16 Jul 2001, 04:20 Great hack works very well and took less than 2 minutes to install. Thank you very much webhost 16 Jul 2001, 12:28 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 17 Jul 2001, 14:36 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 :) Bane 17 Jul 2001, 14:57 Did you use the news.txt that I attached above as your news.php? Maybe you didnt add the require? webhost 17 Jul 2001, 15:01 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 17 Jul 2001, 15:13 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 Bane 17 Jul 2001, 15:20 White Knight - Glad you got it :) Webhost - I really dont know.. Kayn 17 Jul 2001, 15:26 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 17 Jul 2001, 15:30 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 Kayn 17 Jul 2001, 16:37 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 17 Jul 2001, 16:49 Kayn I have the news.php working fine. I must have missed the headlines.php or is this something new you are working on? Kayn 17 Jul 2001, 17:02 Headlines is brand new to this script. I should be releasing it today - :) Bane 17 Jul 2001, 18:06 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. Kayn 17 Jul 2001, 18:23 Hmm... I now have it where it calls the configuration from a separate php file, but that's it. Elaborate please? Bane 17 Jul 2001, 18:30 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. Kayn 17 Jul 2001, 19:28 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? Bane 17 Jul 2001, 19:32 Sounds downright perfect to me :) SystemLogic 17 Jul 2001, 19:42 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 17 Jul 2001, 19:50 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 17 Jul 2001, 22:14 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 ;) Kayn 17 Jul 2001, 22:21 Actually, I think I've got that figured out! :) I'm making some changes now...you'll see the new version out tonight. Kayn 17 Jul 2001, 23:36 New Version is out. Go to the first page to get it! Thanks for all your help ya'll! :) :) Bane 18 Jul 2001, 00:15 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 18 Jul 2001, 01:23 Doesn't seem to work for me. I just get a white screen on both pluhnews.php and pluhheadlines.php Richard Dark_Wizard 18 Jul 2001, 01:36 Did you make the necessary changes to PluhConfig.php? Infinite 18 Jul 2001, 01:44 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
18 Jul 2001, 01:48
Can I have a URL?

Steve Machol
18 Jul 2001, 01:52
Originally posted by Infinite
This is my config file...

$forumspath = "/vb"; ?> I'm willing to bet there's no directory under the root file system called /vb. Try the full directory path instead. It should look something like: /home/user/www/vb Infinite 18 Jul 2001, 01:56 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 18 Jul 2001, 03:11 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 Kayn 18 Jul 2001, 03:31 Funny how picky php is... I learnt that the hard way. :) Redmak 18 Jul 2001, 05:29 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 18 Jul 2001, 05:34 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 18 Jul 2001, 05:45 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 18 Jul 2001, 05:56 If you have more than 5 news items, for some reason, the font goes haywire. Check for proper font opening and closing commands. This also includes bolds, italics, and other font related things. MSIE is far more tolerant of what you MEANT instead of the actual HTML code. View the source of the generated page to find the gross errors, then armed with that information, you can visit the source code and identify where in the loop the errant HTML is being spit out. -deb SystemLogic 18 Jul 2001, 06:02 im positive that's not an issue Kayn 18 Jul 2001, 15:45 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 18 Jul 2001, 19:13 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 18 Jul 2001, 21:49 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 Kayn 18 Jul 2001, 22:20 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. :) Kayn 18 Jul 2001, 22:21 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 18 Jul 2001, 22:31 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 18 Jul 2001, 23:13 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 18 Jul 2001, 23:17 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 19 Jul 2001, 03:26 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. ??? Kayn 19 Jul 2001, 15:30 yes yes, all of that is possible. I can put this on a 'request' list if you like for the next release! webhost 19 Jul 2001, 15:41 yes yes can not wait. Thank You webhost 20 Jul 2001, 11:43 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? Kayn 20 Jul 2001, 15:18 I think you can. Try this: <? include("http://thenameofyourdomain.com/nameofforums/PluhHeadlines.php"); ?> :) webhost 20 Jul 2001, 16:05 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 22 Jul 2001, 03:00 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 22 Jul 2001, 03:03 This works had someone try it today with mind. <? include("http://thenameofyourdomain.com/nameofforums/PluhHeadlines.php"); ?> jarvis 22 Jul 2001, 03:30 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 22 Jul 2001, 03:54 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 dost 22 Jul 2001, 08:37 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 23 Jul 2001, 07:10 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 23 Jul 2001, 13:45 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 23 Jul 2001, 14:12 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
24 Jul 2001, 09:39
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
24 Jul 2001, 10:54
nice :)

Kayn
24 Jul 2001, 15:50
Kengan, Try putting a slash "/" for that. It should work.

webhost
26 Jul 2001, 23:23
Kayn

Any word on the features to be able to pull from more than one forumid?

Great hack

Dark_Wizard
26 Jul 2001, 23:25
Hmmm...are you working on this Kayn? If not I can easily do it for you....;)

Kengan
27 Jul 2001, 03:19
Can you hack like this too ?

http://woody.molofox.net/inline6/

I like part of the feature here !!

sysmom
27 Jul 2001, 06:27
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
27 Jul 2001, 07:12
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 !!

Kayn
27 Jul 2001, 17:40
Hey, if all of you using PluhNews could send me a link, I would love to see that!

Thanks. ;)

Kayn
27 Jul 2001, 17:45
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!

28 Jul 2001, 00:18
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
28 Jul 2001, 01:07
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
28 Jul 2001, 01:07

28 Jul 2001, 01:19
Yeah, I figured it out right before I came back here to reply. :) It was hidding in the PHP. The include that is.

IanMFT
05 Aug 2001, 14:29
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? ruph 11 Aug 2001, 10:54 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! Kayn 11 Aug 2001, 14:19 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 11 Aug 2001, 17:23 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 12 Aug 2001, 17:40 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 BiOS 13 Aug 2001, 10:11 up! ;) BiOS 16 Aug 2001, 14:02 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 16 Aug 2001, 14:12 I followed hack instructions. here is how mind looks http://www.realwebhost.net/PluhHeadlines.php Pulsorock 17 Aug 2001, 23:42 does this script works for VB 2.0.3? sysmom 18 Aug 2001, 00:02 It works in mine. :) And I've only got version 1 of the script going. deb ender 18 Aug 2001, 00:58 Check this out: http://www.particlesun.com It's based off the same concept, just looks different. Pulsorock 31 Aug 2001, 05:46 Great script But I get this error when making a include of the headlines from the amin page (/index.php3) Fatal error: Failed opening required './admin/config.php' (include_path='.:/usr/lib/php') in /var/www/pulsorock/foro/global.php on line 72 But if I go to the script directly, it works fine. Any help on how to use the script using the php include? Rostor 31 Aug 2001, 08:33 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 31 Aug 2001, 13:40 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 31 Aug 2001, 14:51 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 31 Aug 2001, 14:59 ohh... :) I'll will try them now Thanks for all the help Rostor 31 Aug 2001, 15:01 No Problem i'm here for other 3 hours :D:D:D lol Pulsorock 31 Aug 2001, 15:14 :( I tried as you said, but now I get thi error: Fatal error: Failed opening required './global.php' (include_path='.:/usr/lib/php') in /var/www/pulsorock/foro/PluhHeadlines.php on line 6 any idea? Rostor 31 Aug 2001, 15:27 Try to send me the file :) helpguillermo@rostor.net ;) Pulsorock 31 Aug 2001, 16:45 Thanks! It worked :) Bouddha 07 Sep 2001, 13:47 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 07 Sep 2001, 18:00 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 07 Sep 2001, 18:10 look here <removed> sysmom 07 Sep 2001, 20:31 Is version 1.5 up in the first message the most recent version of PluhNews? :) deb Bouddha 07 Sep 2001, 21:45 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 13 Sep 2001, 11:27 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 13 Sep 2001, 12:00 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 13 Sep 2001, 12:19 all the variables are right in the PluhConfig. Goldfinger 13 Sep 2001, 21:37 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 15 Sep 2001, 12:05 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 15 Sep 2001, 12:09 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 15 Sep 2001, 12:22 Actually the problem is with cookies. there is no header.php and footer.php P1aGu3 15 Sep 2001, 12:28 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,$cookiedomain); } else { setcookie($name,$value,$expire,$cookiepath); } } Goldfinger 15 Sep 2001, 12:30 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 15 Sep 2001, 12:33 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 15 Sep 2001, 12:35 doesnt work. P1aGu3 15 Sep 2001, 12:35 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 15 Sep 2001, 12:39 Originally posted by Goldfinger doesnt work. Hrm ... wierd ... Worked on my end ... Those includes must be loaded before ANY html is parsed. Goldfinger 15 Sep 2001, 12:40 try deleting your cookies. because it wiill work if logged onto your board. cause your coookies are still there. P1aGu3 15 Sep 2001, 12:47 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 15 Sep 2001, 12:51 require("forum/fnqglglob.php"); require("forum/fnqglconfig.php"); those 2 files which are they for the average person. P1aGu3 15 Sep 2001, 12:58 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 15 Sep 2001, 13:05 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 15 Sep 2001, 13:06 Hmmm ... thats a new one for me webhost 15 Sep 2001, 13:10 Is this what you guys are trying to do? http://www.realwebhost.net/PluhHeadlines.php or something else P1aGu3 15 Sep 2001, 13:11 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 15 Sep 2001, 13:13 goto back to the previous page it'll explain the problem. webhost 15 Sep 2001, 13:20 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 15 Sep 2001, 13:28 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 15 Sep 2001, 13:32 stilll doesnt work for me. this is making me mad. P1aGu3 15 Sep 2001, 13:37 Which error are you getting ... still the header, or the stripslash ? Goldfinger 15 Sep 2001, 13:38 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 15 Sep 2001, 13:45 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 15 Sep 2001, 13:48 I think i fixed it :D. goto this link http://sfiles.equaked.com/ P1aGu3 15 Sep 2001, 13:50 Lookin sweet to me ... no errors that I can see :D What was it ? webhost 15 Sep 2001, 13:50 Great! I bet you are happy Goldfinger 15 Sep 2001, 13:53 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 15 Sep 2001, 13:53 Yes i am very happy thanks for all the help guys. :) P1aGu3 15 Sep 2001, 13:54 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 15 Sep 2001, 13:55 webhost, thanks for the cookie domain suggestion :D Goldfinger 15 Sep 2001, 13:55 yes i think cookies were created by the devil. and are possesed. :) usbnuts 16 Sep 2001, 19:10 Do you what is causing the header problem? webhost 16 Sep 2001, 19:35 usbnuts Go back and read the last 15 post's you will see how to fix the problem you are having. Goldfinger 17 Sep 2001, 12:55 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 17 Sep 2001, 19:29 u have to define the two mySQL queries with different LIMIT value. Bouddha 18 Sep 2001, 20:56 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]" />
<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>
</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 ;)

IanMFT
19 Sep 2001, 06:37
Ok, 1 problem and one request

PROBLEM
The PluhHeadlines.php file seems to be constantly connected to my forums as seen here:
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
21 Sep 2001, 20:22
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
21 Sep 2001, 23:25
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
23 Sep 2001, 16:16
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
29 Sep 2001, 10:26
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
29 Sep 2001, 14:13
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
29 Sep 2001, 19:01
You could just install multipul PluhNews' on your server...

PluhConfig1.php
PluhNews1.php
PluhFooter1.txt

PluhConfig2.php
PluhNews2.php
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
29 Sep 2001, 20:14
Thanks Craig, the ...more... thing works perfect, with the multiple Newsfiles I had the same idea :D also works.

SirSteve
29 Sep 2001, 23:39
Originally posted by Craig Armstrong
You could just install multipul PluhNews' on your server...

PluhConfig1.php
PluhNews1.php
PluhFooter1.txt

PluhConfig2.php
PluhNews2.php
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
09 Oct 2001, 23:23
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.

// 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.

Kayn
10 Oct 2001, 21:22
Wow, look at all these posts. :)

Sorry I've been gone, but I'm glad there are people using my little hack. :)

SirSteve
10 Oct 2001, 21:30
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 Oct 2001, 21:35
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?

Kayn
10 Oct 2001, 21:36
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 Oct 2001, 22:45
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

Today's News

However at the very bottom its posting my news.. is there somthin I missed? hehe

Goldfinger
10 Oct 2001, 22:47
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 Oct 2001, 22:49
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 Oct 2001, 22:52
I read it but have a short term memory :p Ill dig back a bit hehe

Hamma
10 Oct 2001, 23:17
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 Oct 2001, 23:50
eh I cant get this thing to work for the life of me.

Goldfinger
11 Oct 2001, 02:38
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
11 Oct 2001, 03:10
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
11 Oct 2001, 12:42
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:

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
11 Oct 2001, 19:35
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
11 Oct 2001, 19:37
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
11 Oct 2001, 21:34
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
11 Oct 2001, 21:59
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
11 Oct 2001, 23:14
also try putting your PluhNews in the same directory as your index.php seeing thats what the instructions say :).

Hamma
11 Oct 2001, 23:50
Yep. Tried that :( (thats where it is now with these errors)

Hamma
12 Oct 2001, 22:32
*bump*

Anyone have any ideas?

Goldfinger
13 Oct 2001, 01:56
im fresh out of ideas.. maybe one of the real gurus can help you :).

WOOHOO!!

</Goldfinger is now a senior member :), 100th post >

Hamma
13 Oct 2001, 20:55
*bump* again, someone help me :(

hehe

Hamma
15 Oct 2001, 23:45
I figured it out, just deleted the code giving me errors and created a global2.php :)

Hamma
15 Oct 2001, 23:53
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

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
23 Oct 2001, 16:14
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
31 Oct 2001, 05:04
I fixed everything until I didn't get any more path error messages, but nothing is included :(

http://www.wiredguy.com/test.php

rkettner
31 Oct 2001, 05:41
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
31 Oct 2001, 17:20
If you visit the page in a browser, nothing shows up either:

- http://www.wiredguy.com/forums/PluhNews.php

What's going on?

rkettner
01 Nov 2001, 16:40
I'm pleased to announce.... it works!!! :)

DarkReaper
12 Nov 2001, 22:03
Does this work with 2.2.0?

Hamma
23 Nov 2001, 19:06
Yes.

Mac Write
23 Nov 2001, 22:46
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

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 24 Nov 2001, 00:44 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 24 Nov 2001, 02:16 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 24 Nov 2001, 20:38 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:

$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
24 Nov 2001, 20:45
This "tweak" is for people who installed fastforward's spider friendly urls.

In PluhNews.php Find:
//gotta convert that damn unix time crap

$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
24 Nov 2001, 21:09
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
24 Nov 2001, 21:32
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 25 Nov 2001, 01:30 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 01 Dec 2001, 18:17 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 01 Dec 2001, 18:32 What'd you do? And would you be willing to release the modifications? amykhar 01 Dec 2001, 18:47 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 Dec 2001, 20:55 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

Kayn
13 Dec 2001, 17:54
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
13 Dec 2001, 18:03
It's in the mail. :)

Amy

Xube
13 Dec 2001, 21:56
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. :)

Xube
13 Dec 2001, 22:08
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?

Kayn
14 Dec 2001, 15:51
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
15 Dec 2001, 00:30
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!! :)