vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   PluhNews 1.5 (https://vborg.vbsupport.ru/showthread.php?t=21875)

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:

PHP Code:

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

PHP Code:

//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-10-2001 08:22 PM

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

Quote:

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?

Kayn 10-10-2001 08:36 PM

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

Quote:

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

Quote:

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

Code:

<?php Include ("/forums/Pluhcomments.php"); ?>
I get the following

Quote:

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

Quote:

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

PHP Code:

Virtual ("/forums/PluhHeadlines.php"

So then I remove the
PHP Code:

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

Quote:

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:
PHP Code:

$sql "SELECT threadid, title, forumid, replycount, postusername, postuserid, lastposter, dateline, iconid FROM thread WHERE forumid = \"$newsforums\" ORDER BY threadid DESC LIMIT $newsitems"

Replace with:
PHP Code:

$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:
PHP Code:

$newsforums "72,76"

I haven't tested the headlines script, but it goes like this:

In PluhHeadlines.php Find:
PHP Code:

$sql "SELECT threadid, title, forumid, replycount, postusername, postuserid, lastposter, dateline, iconid FROM thread WHERE forumid = \"$newsforums\" ORDER BY threadid DESC LIMIT $newsitems"

Replace with:
PHP Code:

$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:
PHP Code:

$linkcode "$forumspath/t".$threadid .".html"

Find:
PHP Code:

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:

PHP Code:

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?


All times are GMT. The time now is 02:01 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01802 seconds
  • Memory Usage 1,852KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (12)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete