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)

Sean 12-31-2001 12:21 PM

Sure.. Ok, now just change the path and stuff to the path to whatever PHP file you put this on:

Code:

<?
require("/path/to/global.php");
require("/path/to/admin/config.php");
//first load global.php & the vB config file

//use this if you want two variables at the top /?var1=blah&var2=blah

if (isset($var1) && isset($var2))  {include ("/path/to/var1.php");}
//You can also use var2 in the path, or use it to determine what conf file you want to load...

//Use this if you want one variable /?var1=blah
if (isset($var1))  {include ("/path/to/var1.php");}


//Ok, now on the page load the conf_$var1 file (specified above) than include the news.php file

include("/path/to/news/conf_$var1");
include("/path/to/PluhNews.php");

?>

Now, if their are any errors, let me relook the code, I sorta wrote the whole thing in here.. BTW: I am no PHP pro. i just know this stuff. :)

sianews 12-31-2001 12:28 PM

I must be dumbed then I thought :).

What/Where is "path/to/var1.php" and "path/to/news/conf_$var1"?

And I was replacing </path to pluhnews.php> with this script. Was that correct?

Sean 12-31-2001 12:31 PM

Oops, that was suppose to be a variable..

Alright..that "path.to/varl" is suppose to be "/path/to/$var1" This is determined by whatever the variable is... HOWEVER, you are not doing the same thing I am doing..let me re-write this for what you want to do.

Give me a few minutes. :)

Sean 12-31-2001 12:34 PM

Code:


<?
require("/path/to/global.php");
require("/path/to/admin/config.php");
//first load global.php & the vB config file

//Use this if you want one variable /?var1=blah
//conf_$var1.php is the different Configuration file for PluhNews...So, if you put this code in file.php,
//and loaded file.php like this: file.php?var1=news, it
//would load the configuration file called: conf_news.php
//(this would have the contents of PluhConfig.pgp in it.

if (isset($var1))  {include("/path/to/news/conf_$var1.php");
}  else  {}


//than include the news.php file

include("/path/to/PluhNews.php");

?>


BTW: You can $var1 to ANYTHING you want.. to load for example, or file, or news, or forums, or absolutly anything, as long as I starts with a letter and doesn't end with a _.. :)

Make sure you change them both if you do.

Sean 12-31-2001 12:39 PM

ALSO. After loading the different config file, you can load PluhHeadlines.php, and it will be different depending on your config file..

include this before or after the news.php include, or just replace it with this:

Code:

include("/path/to/PluhHeadlines.php");
I hope this all works for you.

Kayn 12-31-2001 02:20 PM

Categories...I have a weird way of working the categories when I wrote PluhNews initially.

I left it out though, mostly because it was a quick fix, but here's what I did.

Basically, when you post news, you select a certain icon that would represent the category.

See here: http://pluh.com/forums/newthread.php...read&forumid=1

If you look at the last four icons, they represent the categories: Gaming is the gaming category, Music is the music category, and so forth.

Could you all work with something like that? I did this so I wouldn't have to make any database changes or MAJOR code rewriting. :D

sianews 12-31-2001 02:22 PM

Isn't there a way to assign, say, "fourumid1" = "Category1", and so fouth?

sianews 01-07-2002 03:38 PM

Never did get that to work.

Still looking for a way to call news from multiple forums.

bobbydavro 01-08-2002 04:27 PM

I have installed this along with admins can bump without posting. However when you do bump a post without posting (in your news group) it brings the post to the top in the forum but not on the news page.

Any way to change this?

sianews 01-10-2002 12:48 PM

Quote:

Originally posted by sianews


Still looking for a way to call news from multiple forums.

bump

Martz 01-24-2002 10:49 AM

Good hack apart from the fact smilies are not parsed - and I cannot and will not change the path of the smilies relative to my domain - that defeats the whole purpose and creates loads of work.

Thanks :)

FleaBag 01-25-2002 03:59 PM

Right here's my situation. The script works fine in the /board subfolder where my forums are. But SSI and PHPInclude on other pages is refusing to work. Hence, is there a way to get these scripts running above the path of the forums folder. So then for example you could rename PluhNews.php to be the index file of your site?

Thanks in advance. Great script, keep up the good work. :)

sianews 01-26-2002 01:16 AM

I ended up using the full URL path rather than the relative path.

Snake~eyes 01-28-2002 05:19 PM

a little note

If you have a site where people submit news. I came up with this little idea. Maybe you guys have, maybe not but its very helpful.

Instead of submitting news via email they have to submit them via forums

-I created a seperate forum, call it submit news and what not.
-I changed the permissions so that people can't see other peoples posts. That way no one knows about the news 'cept for the poster and the admins.
-If someoen posts news and yo think its worthy material just move it to the news forum. If not just reply and say its not.

Simple I think. :D

The only thing is, it says posted by instead of submitted by. But that's okay with me.

sccr410 01-29-2002 07:24 PM

I set it up straight from the zip file, and I get:
Quote:

Fatal error: Failed opening required './global.php' (include_path='.:/usr/local/lib/php') in /home/sandieg/public_html/forum/PluhNews.php on line 6
I do absolute paths for the require and I get:
Quote:

Fatal error: Call to undefined function: bbcodeparse2() in /home/sandieg/public_html/forum/PluhNews.php on line 80
So, now what?



Also, I would like to have the ability to show attached files on the main page. A lot of the time, the people who add news posts are uploading schedules written in a Word doc and load them along with the post. Can this be added?

sccr410 01-30-2002 08:03 PM

Nobody?

DiscussAnything 01-31-2002 11:34 PM

Great script!

Got it working in its simple form...

Now to tackle the look and feel issue and multiple forums.

Thanks!

If anyone has insight on how to do multiple forums wihtout multiple instances of the files that'd be great.

DrkFusion 02-01-2002 12:21 AM

Hey, how would I go about displaying avatars?

Jackyl 02-01-2002 12:57 PM

############## EXAMPLE ERROR #######
Warning: Undefined variable: REQUEST_URI in D:\SITES\site34\www\forums\global.php on line 60

Warning: Undefined variable: QUERY_STRING in D:\SITES\site34\www\forums\global.php on line 68

Warning: Undefined index: HTTP_POST_VARS in D:\SITES\site34\www\forums\global.php on line 85

Warning: Undefined index: action in D:\SITES\site34\www\forums\global.php on line 85

Warning: Undefined index: action in D:\SITES\site34\www\forums\global.php on line 88

Warning: Cannot add header information - headers already sent by (output started at D:\SITES\site34\www\forums\global.php:60) in D:\SITES\site34\www\forums\admin\functions.php on line 1490

####################################

ok guys - I saw a similar error posted a few pages back - I read this entire thread 3 times, and if there was a fix posted I missed it. I'm running IIS 5 if that makes a difference...

I copy all files into the /forums directory - when I go directly to the PluhNews.php I get the above error, but below that the news is displayed - same thing if I use a PHP include in another page - the news is there, right below the same list of errors - I inserted the chdir code above the include global line in the PluhNews.php file - same error. I have tried relative and absolute paths...

This isn't an include problem because it shows the error if I go directly to the nPluhNews.php page - I peeked around in the source, but I'm not too handy with php (or VB for that matter)

The only think I changed during installation was the forums ID - everything else works with the default settings - after getting the error I did change several things playing with variables and paths - various errors came up - the closest I get is a fresh install with no changes because at least the news is displayed under the above errors...

If someone knows what's wrong or could steer me in the right direction I would be grateful.

Thanks in advance for any assistance!

Jackyl 02-01-2002 12:57 PM

oops dbl post arg

DrkFusion 02-02-2002 01:42 PM

So how would I go about making my avatar viewable?

Darren Evans 02-03-2002 12:26 AM

I've followed the instructions to a tee and can not get this script to run including it in a page.

I ran it in raw form from PluhNews.php and PluhHeadlines.php with no problems.

Included in a root index.php file will not work. I keep getting the following error:

Quote:

Fatal error: Failed opening required './global.php' (include_path='') in /home/site/public_html/forums/PluhNews.php on line 5
The include looks like this:

PHP Code:

<? include ("forums/PluhNews.php"); ?>

My PluhConfig file (placed in the forums directory) was tried with vared paths with out success:

PHP Code:

require("global.php");
require(
"PluhConfig.php");
require(
"admin/config.php"); 

Yes, I tried it with full path info (ie, /home/site/public_html/forums).

This thread is very confusing with posts from way back in July 2001.

Any help would be greatly appreciated.

DrkFusion 02-03-2002 01:06 AM

Quote:

Originally posted by Darren Evans
I've followed the instructions to a tee and can not get this script to run including it in a page.

I ran it in raw form from PluhNews.php and PluhHeadlines.php with no problems.

Included in a root index.php file will not work. I keep getting the following error:



The include looks like this:

PHP Code:

<? include ("forums/PluhNews.php"); ?>

My PluhConfig file (placed in the forums directory) was tried with vared paths with out success:

PHP Code:

require("global.php");
require(
"PluhConfig.php");
require(
"admin/config.php"); 

Yes, I tried it with full path info (ie, /home/site/public_html/forums).

This thread is very confusing with posts from way back in July 2001.

Any help would be greatly appreciated.


DrkFusion 02-03-2002 01:07 AM

Quote:

Originally posted by DrkFusion
So how would I go about making my avatar viewable? For every post, so for example on news.php my avatar will show as well.
Anyone Know?

sccr410 02-03-2002 01:54 AM

Darrenn Evans...

I am having the same problems, but I have managed to get it working, but not completely. Do the following and at least it should show up:

Change:
PHP Code:

require("global.php");
require(
"PluhConfig.php");
require(
"admin/config.php"); 

to:
PHP Code:

include("/home/site/public_html/forums/admin/functions.php"); 

Then, change:
PHP Code:

$bericht=bbcodeparse2($pagetext,"1","1","1","1"); 

to:
PHP Code:

$bericht=bbcodeparse2($pagetext,"1","1","0","0"); 

Then, you have manually set the variables for your database (i.e. $servername, $dbusername, $dbpassword, and $dbname)

It should work on your main page, however it won't parse the bbcode.

I am having the exact same problem as you, so hopefully we can bug the hack creator enough to help us out!

DrkFusion 02-03-2002 02:16 AM

Quote:

Originally posted by DrkFusion


So how would I go about making my avatar viewable? For every post, so for example on news.php my avatar will show as well.

So umm, anyone here?

monitox 02-03-2002 05:53 PM

I want to include the title of the news in an shtml page... with this : <!--#include virtual="PluhHeadlines.php" -->

Well.. is NOT working :(

Any1 can help me ? Without this thing I can not use it :(

Darren Evans 02-03-2002 06:01 PM

Is this hack not being supported any more? :(

monitox 02-03-2002 06:07 PM

This hack is REALLY GREAT.. PLS someone help us :(
Even if you are not the author.. maybe YOU can help us..

* you = ANY good ppl on php :)

DrkFusion 02-03-2002 11:37 PM

Quote:

Originally posted by monitox
This hack is REALLY GREAT.. PLS someone help us :(
Even if you are not the author.. maybe YOU can help us..

* you = ANY good ppl on php :)

Yea Please :(

monitox 02-04-2002 11:27 AM

Ok is WORKING !

<!--#include virtual="/forum/PluhHeadlines.php" -->

Try it ! :up:

You can see it in action here : www.softnews.ro ( I will update it after 20.00 GMT )... :pleased:

Hamma 02-04-2002 02:16 PM

I have a couple different variations of this script configured and they all work. However I get a vbdb error when I try and include the headlines and the news on the same page.

It doesent say specificly what the error is :| the headlines appear but there is a db error.. I am trying to include 3 versions of the script on the same page as I want to pull news from our subsites.

Here is the vB error I get

Quote:

Database error in vBulletin 2.2.1:

Invalid SQL: UPDATE session SET lastactivity=1012596337,location='' WHERE sessionhash='4fe525994dc6e5db159e451f0feb7ad1'
mysql error:

mysql error number:

Date: Friday 01st of February 2002 12:45:37 PM
Script: http://www.dragonwolves.com/forums/index2.php
Referer:
Anyone got any ideas? (btw that file location it gives is not correct, the file is not in the /forums directory)

Hamma 02-04-2002 03:03 PM

BTW I get this when includeing headlines and news on the same page. EVEN when I use the same config file (the way im doing this it would be using multiple config files)

DrkFusion 02-04-2002 08:15 PM

Quote:

Originally posted by DrkFusion
So how would I go about making my avatar viewable? For every post, so for example on news.php my avatar will show as well.
Please anyone?

Hamma 02-05-2002 11:35 AM

Any ideas on this error?

voogru 02-05-2002 09:07 PM

im trying to make this html work

Code:

<style>
.pluhpost{  border: 1px #616889 solid; background-color: #ffffff; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #000000; text-decoration: none}
</style>
<table width=\"100%" border=\"0" cellpadding=\"0" cellspacing=\"0" class=\pluhpost>
  <tr>
    <td width=\"100%" height=\"245" valign=\"top">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>
<blockquote>$bericht</blockquote>
<center><a href=\"$forumspath/showthread.php?s=&threadid=$threadid\"><b>$replycount</b> $commenttext</a> Last comment was by <b>$lastposter</b></center><hr noshade height=\"1\" width=\"60%\"><p>
";

}
}


//add news search stuff (this is optional - delete if you do not wish to include this, or edit it to meet your needs
echo \"<center><a href=\"$forumspath/search.php?s=\">Search the News</a> | <a href=\"$forumspath/forumdisplay.php?s=&forumid=$newsforums\">View All News Posts</a></center>";
</td>
  </tr>
</table>

can someone guide me in getting it to work properly, i just get parse errors :(

Snake~eyes 02-05-2002 09:14 PM

I believe it says in the readme

Where evr you have quotes you need to put a \ before it

for instances this line

Code:

<table width=\"100%" border=\"0" cellpadding=\"0" cellspacing=\"0" class=\pluhpost>
should be...

Code:

<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\pluhpost>

voogru 02-05-2002 09:32 PM

still get parse error :(

Hamma 02-07-2002 08:47 PM

Still need help with this error =\

Kayn 02-07-2002 11:02 PM

Hello,

I just received an e-mail asking if I was supporting my hack, PluhNews. As of now, I'm am WAY to busy to provide tech support and help. Fortunately, there are many here who have had problems AND have had them resolved by helping each other out where needed.

I am not abandoning this hack, I do plan on returning and adding new stuff to it in the future. As of now, my schedule is much to crazy.

Thanks! Good luck. :up:


All times are GMT. The time now is 07:44 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.02434 seconds
  • Memory Usage 1,850KB
  • 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
  • (6)bbcode_code_printable
  • (8)bbcode_php_printable
  • (10)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