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)

SystemLogic 02-20-2002 04:14 PM

Yeah they are calling the right path, also PluhNews, PluhHeadlines, and PluhConfig are all located in the VB directory.....

Gutspiller 02-20-2002 04:31 PM

Yes they have to be in there, but the file that they are included in, the file that I told you to put those required lines before the < html > tag. That file has to be in there as well.

This simple post here: https://vborg.vbsupport.ru/showthrea...397#post219397

Puts it out there, and I think it's pretty much the truth.

You can use the refresh html command to make it go there like I do. When people go to www.GameForumz.com it loads an index file that has this line

<META http-equiv=Refresh content=0;URL=http://www.theforumz.com/forumz/news.php>

right after the <html > tag. Is what it tells the browser to do, is instantly refresh the browser and go to my news page that IS within my vb directory. This is the easiest way I have foudn to get this script to work. Then in my news page I have this line

<meta http-equiv="Refresh" content="300">

Which tells the news page to refresh ever 5 minutes. This makes it so that when the page is updated, people will know about it, at a maximum time of 5 minutes since it was last updated. You can use longer if it's a page that is only updated a few times a day or something. This is what I do and it seems to work. MY only problem is that the script gets this error at the bottom of the page:

Warning: 1 is not a valid MySQL-Link resource in /home/theforum/public_html/forumz/admin/db_mysql.php on line 93

There seems to have been a slight problem with the database. Please try again by pressing the refresh button in your browser.

An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.

We apologise for any inconvenience.


Database error in vBulletin: Invalid SQL: UPDATE session SET lastactivity=1014229334,location='/forumz/gamingnews.php',styleid=1 WHERE sessionhash='58b532c55d874f83029b1708f688821d'
mysql error:
mysql error number:
Date: Wednesday 20th of February 2002 10:22:20 AM
Script: /forumz/gamingnews.php
Referer:

which I have narrowed down to if you have both the headlines and the news file running on the same page it gives that error. The news by itself doesn't give that error and the headlines by itself doesn't give that error. I have been working on getting rid of this error for quite some time, but have still been unsuccessful on doing so. :(

I am going to email Kayn today and see if he can help with this error. If not, then even after all the tweaking and hacking on this error and 25 pages of posts, nobody will know how to get this hack to run. If I find out more I will let you know though. :up:

SystemLogic 02-20-2002 04:43 PM

Well I do have those require's before <html> in the index file....

Gutspiller 02-20-2002 04:46 PM

Do you have the index file in your vb directory though? and if you don't and you move it, make sure you change the paths in those require lines and let me know if that works. If it does, then that is as much as anybody has gotten this hack to work. If it doesn't then you do have other problems.... which I wouldn't know how to fix really, because my file is in my forum directory and it works. :confused:

SystemLogic 02-20-2002 04:50 PM

Just tried it in there and it didn't work still...

Gutspiller 02-20-2002 04:59 PM

hmm. Well if you can, email me your news,headlines,config and the index file calling them and I will take a look at them and see if I can see what's wrong.

Webmaster@CuttingTheEdge.com

Hamma 02-20-2002 05:00 PM

My file is outside of my forum directory. I had those stripslash and header errors at one point too. I ended up haxing the code that was causing the error and making a global2.php, that fixed it :p I am able to include my news on a file outside of the forum dir now.

However I dont recall getting that smily error

SystemLogic 02-20-2002 07:30 PM

Hamma, how did you fix that striplash error?

Hamma 02-20-2002 08:39 PM

I removed a few lines of code from global.php and saved a second copy, global2.php

Im not exactly sure what I removed.. since it was a while ago. I suppose I could attach the file.. ill have to get it when I get home.

SystemLogic 02-20-2002 08:44 PM

Thanks ;)

Hamma 02-20-2002 10:45 PM

Alright I am on roll today.. first of all attached to this post is my modified global.php that works with my news. Just require it, instead of global.php (I have had no problems doing this) this will address stripslash errors

Second I have resolved the issue with including multiple news, and headlines on one page. The problem seems to be the script trying to do everything on one SQL connection. This is easily fixed:

Find this
PHP Code:

$connection mysql_connect("$servername","$dbusername","$dbpassword") or die ("Cannot connect to server."); 

And change it to

PHP Code:

$connection2 mysql_connect("$servername","$dbusername","$dbpassword") or die ("Cannot connect to server."); 

Now, after you do this you will have to find every instance of $connection and change it to what you set on that line. You can call it whatever.. $connectionilikecheese for example :p Put any further questions here, all these things worked for me :D

Check it all out here: http://www.dragonwolves.com

sccr410 02-21-2002 06:23 AM

I get the following error:
Quote:

Warning: Cannot add header information - headers already sent by (output started at /home/sandieg/public_html/index.php:3) in /home/sandieg/public_html/forum/admin/functions.php on line 1530
I just uploaded and required only your global2.php (making sure to change all the path info to my own paths)

Hamma 02-21-2002 10:55 AM

Ok, did you put the include lines at the top of your index page? (the page your including the news on)

<?
require("/path/to/global2.php");
require("/path/to/admin/config.php");
require("/path/to/PluhConfig.php");
?>

The only require line in the phuhnews.php should be

require("PluhConfig.php");

Rename and update to your paths of course.

Gutspiller 02-21-2002 03:12 PM

Hamma, did you ever get this error:

Warning: 1 is not a valid MySQL-Link resource in /my/path/forumz/admin/db_mysql.php on line 93

There seems to have been a slight problem with the database. Please try again by pressing the refresh button in your browser.

An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.

We apologise for any inconvenience.


Database error in vBulletin: Invalid SQL: UPDATE session SET lastactivity=1014310822,location='/forumz/testpage.php',styleid=1 WHERE sessionhash='864316a4ee913aaef151a03edd678015'
mysql error:
mysql error number:
Date: Thursday 21st of February 2002 09:00:24 AM
Script: /forumz/testpage.php
Referer:

and If you did, how did you fix it? I keep getting it at the bottom of my page. I only have 1 headlines and 1 news on the page, but it gives that error, and I have no idea how to get rid of it. :(

Any help from anybody would be appreciated.

Thanks.

Hamma 02-21-2002 03:31 PM

My post above entitled "2 for 2" explains how i fixed that. Its trying to do all those DB queries on one connection and dying out. I made it so it does the query on a different connection for each script :D

Gutspiller 02-21-2002 04:26 PM

Hamma, so if I have say 2 different news things on one page, both headlines and news, I would rename all the $connection in one headline file to $connection1, and in one news file $connection2 and in the other news file $connection3?

So that in one headline it called $connection (the default), the 2nd headlines it called $connection1, in one of the news in called $connection2 and in the 2nd news it called $connection3.

Is that correct?

Hamma 02-21-2002 04:45 PM

Yes, thats pretty much it.. each script needs its own connection name. So each headline/news script would have a seperate one.. make sure you rename every instance of $connection (im pretty sure it shows in only the script, and not the config file)

This worked like a charm for me :D And you were getting pretty much the same errors.

Example:

Ive incuded 1 news, and 2 headlines on my index.php

News
$connection in the mainnews.php was renamed to

$connectionnews

Headlines
$connection in the t2headlines.php script was renamed to

$connectiont2

$connectoin in my daocheadlines.php was renamed to

$connectiondaoc

Let me know how it works out..

Gutspiller 02-21-2002 05:09 PM

Seems to work. Got rid of the error and everything. Great work. After how many times and people have been to this thread, it's surprizing it was something soo simple... Although I had a feeling that it would be something simple.

Many thanks.

Also for anybody using a lot of different connections you may want to double check your config.php file in your admin directory and make sure that you DON'T have persistant connection on, because if you have a lot of different news scripts each taking a spot on your mysql connections to the database, it could limit the access to your site.

Thanks Hamma, we finally traced down that pesky bug. I doubt everybody else that replied in those earlier pages knows that we fixed it. Maybe you should post something on one of the main forum pages and let everybody know that the PluhNews script is working again. :D

Good job.

sccr410 02-21-2002 05:21 PM

In my index.php file:

PHP Code:

<?php 
        
require("/home/sandieg/public_html/forum/global2.php"); 
        require(
"/home/sandieg/public_html/forum/admin/config.php"); 
        include(
'/home/sandieg/public_html/forum/PluhNews.php'); 
?>

I don't have PluhConfig.php because all the config options were moved into the PluhNews.php. I have multiple pages that access different news forums, so I had to do this.

I still get the following error:
Quote:

Warning: Cannot add header information - headers already sent by (output started at /home/sandieg/public_html/index.php:3) in /home/sandieg/public_html/forum/admin/functions.php on line 1530

Gutspiller 02-21-2002 07:59 PM

Check your other files sccr410 and make sure they aren't "requiring" the same files that you are requiring in the index.php file. I know I had that problem before too, and I think that was the cause, is that there were multiple files requiring the same files.

Let me know.

sccr410 02-21-2002 08:11 PM

In global2.php there was a require to admin/config.php and in the require statements on my index.php the suggestion was to require the same file. I commented out the require on the index page, that didn't work. Commented out the one on the global2.php file, that made things even worse.

I have it working fine, but mine doesn't know how to read bbcode. I was hoping all this would fix that.

http://www.sandiegopegasus.com

Hamma 02-21-2002 08:15 PM

hmm, You removed my path from the global2.php and added your own correct? (I think there were a few instances)

sccr410 02-21-2002 08:28 PM

Yep, sure did.

Hamma 02-21-2002 08:34 PM

k hmm if i remember correctly that is related to cookies, did you change the cooking setting in the CP to .yourdomain.com ?

Hamma 02-21-2002 08:37 PM

also you dont want to include the file in the top line with the other files, you would want to include it somewhere else on the page

<? include('/home/sandieg/public_html/forum/PluhNews.php'); ?>

sccr410 02-21-2002 08:46 PM

Ahh, I made the require statements the first thing on my index page and it worked :)

Now, the only problem is that the path to the smilies is wrong and I get the red x box :(

sccr410 02-21-2002 08:51 PM

Nevermind, now the smilies work too :) It's all working 100% now! WOOHAW!

Now I shouldn't get any "Why doesn't this work?" questions from all the team managers trying to use it :)

Hamma 02-21-2002 09:55 PM

lol congrats, always ends up bein somthin easy ;) Im gonna end up being an expert on this script lol

SirSteve 02-22-2002 07:08 PM

What about a teaser line and "Click here" for the full story where you get a separate page with the full article (that doesn't look like the forums)? And the ability to included attachments within the article...

sianews 02-23-2002 01:26 AM

Steve, we alreasdy have that in the character limit on page 11 or 13 I think. The problem is, only the latest article from any given forum can be shown on the websites template. See www.sianews.com/columnists.php for example. On each columnists page, I have their latest article, but PluhHeadlines can only link to the forum :(.

I was thinking of linking to www.sianews.com/forums/authorid.php?threadid in the Headlines file, but I don't know how to pullt hat threadid back out of the URL to make it display.

Does that even make sense :).

Abbas 02-25-2002 01:45 PM

I wanted to add the "icon" that you can select in vB while posting a new item to appear on the news as well. Can someone tell me what vB command do I need to add to display that...One of those commands that start with a $

Thanks
Abbas

Ian Cunningham 02-28-2002 02:07 PM

Um... this is wierd... I have included the headlines.php file into my template footer (removing the call for global.php) but my forums arent displaying!? I am just getting the bottom "Private Message" bar when this script in included in the page!?

SugarChick 03-01-2002 09:56 PM

nm my host is gay it fixed itself...

princess 03-11-2002 11:09 PM

Anyone know how I could add the first few lines of a news post to the headlines? For example, headlines would look like this:

news article 1
here are the first few lines of the first news article [ read more ]
news article 2
here are the first few lines of the second news artcile [ read more ]
news article 3
and just for fun this one gets a different first few lines [ read more ]
news article 4
so does this one, see what i'm saying?[ read more ]

sianews 03-14-2002 02:51 AM

Limit characters here :).

Gutspiller 03-14-2002 07:28 PM

Can somebody help me to get this hack work across domains?

I take this page: http://www.theforumz.com/forumz/frontpage.php

and change all the stuff to look at: http://www.theforumz.com/forumz/plugnews.php or whatever the file name is.

I changed the requiring files to the same thing where I tell it the full domain path. When I try to use the page across a domain it gives me this error:

Fatal error: Failed opening required 'http:www//TheForumz.com/forumz/global.php' (include_path='') in (my domain path)\testfrontpage.php on line 1

So it is having a problem even doing the requiring the global.php part.

Can somebody please help me on how I can get this to work.

Thanks for any help you guys can provide.

SystemLogic 03-14-2002 07:33 PM

I think on global.php you need to require the files with the entire URL path....try that....

Dherkhon 03-16-2002 04:20 AM

sorry for by bad english :p

here is my error lol

Quote:

Parse error: parse error in /homepages/32/d34562187/htdocs/forums/PluhNews.php on line 81
and here is my html

Quote:

//Edit the HTML here (keep in mind that any double quote that is HTML requires a backslash in front of it)

<table width=\"90%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\"> <- Line 81
<tr>
<td bgcolor=\"#000000\">
<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td bgcolor=\"#6B7E89\">

echo "

<a href=\"$forumspath/forums/showthread.php?s=&threadid=$threadid\"><b>$title</b></a> - <a href=\"$forumspath/forums/showthread.php?s=&threadid=$threadid\"><b>$replyco unt</b> $commenttext</a><br>
Posted By <a href=\"$forumspath/forums/member.php?s=&action=getinfo&userid=$postuserid\"> <b>$postusername</b></a> at <i>$dateposted</i>
</center>

</td>
</tr>
<tr>
<td bgcolor=\"#6B7E89\">

<blockquote></a>$bericht</blockquote><center><a href=\"$forumspath/forums/showthread.php?s=&threadid=$threadid\"><b>$replyco unt</b> $commenttext</a> Last comment was by <b>$lastposter</b></center><hr noshade height=\"1\" width=\"60%\"><p>
";


</td>
</tr>
</table>
</td>
</tr>
</table>

}
}



//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/forums/search.php?s=\">Search the News</a> | <a href=\"$forumspath/forums/forumdisplay.php?s=&forumid=$newsforums\">View All News Posts</a></center>";



//end HTML edit
//**********************
Thanks for help :cheeky:

Brian Cruz 03-16-2002 05:13 AM

I'd really like to be able to display the avatar and thread icon for each news post. How can the script be modifed to call those up?

Brian Cruz 03-20-2002 03:28 AM

Quote:

Originally posted by Brian Cruz
I'd really like to be able to display the avatar and thread icon for each news post. How can the script be modifed to call those up?
Anyone? Please?


All times are GMT. The time now is 08:52 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.01800 seconds
  • Memory Usage 1,844KB
  • 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
  • (3)bbcode_php_printable
  • (5)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