![]() |
Yeah they are calling the right path, also PluhNews, PluhHeadlines, and PluhConfig are all located in the VB directory.....
|
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: |
Well I do have those require's before <html> in the index file....
|
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:
|
Just tried it in there and it didn't work still...
|
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 |
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 |
Hamma, how did you fix that striplash error?
|
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. |
Thanks ;)
|
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:
PHP Code:
Check it all out here: http://www.dragonwolves.com |
I get the following error:
Quote:
|
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. |
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. |
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
|
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? |
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.. |
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. |
In my index.php file:
PHP Code:
I still get the following error: Quote:
|
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. |
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 |
hmm, You removed my path from the global2.php and added your own correct? (I think there were a few instances)
|
Yep, sure did.
|
k hmm if i remember correctly that is related to cookies, did you change the cooking setting in the CP to .yourdomain.com ?
|
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'); ?> |
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 :( |
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 :) |
lol congrats, always ends up bein somthin easy ;) Im gonna end up being an expert on this script lol
|
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...
|
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 :). |
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 |
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!?
|
nm my host is gay it fixed itself...
|
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 ] |
Limit characters here :).
|
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. |
I think on global.php you need to require the files with the entire URL path....try that....
|
sorry for by bad english :p
here is my error lol Quote:
Quote:
|
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?
|
Quote:
|
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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|