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)
-   -   Simple newsportal / thread overview to add to your board... (https://vborg.vbsupport.ru/showthread.php?t=38334)

Crazy Pete 05-05-2003 04:09 PM

I'm getting this error when I try to include the news on a non-forum page. I already removed the $header and $headinclude statements from the newsthreads template, as I don't need them on the other page. When I'm already logged in and browsing the forums, everything's fine, but if I just hit the homepage (where the news in included) first, I get this error...

Warning: Cannot modify header information - headers already sent by
(output started at /home/pete/public_html/index.php:44) in
/home/pete/public_html/forums/admin/functions.php on line 1753

KuraFire 05-06-2003 12:03 AM

this hack is a standalone, not usable as a portable hack.

If you want to include it, you'll just have to copy - paste the code for JUST THE NEWS stuff only, and hook that up into your non-forum page script.

Robink 05-06-2003 06:28 AM

Quote:

Yesterday at 04:08 AM Tigga said this in Post #118
Double check that your forum permissions are set correctly for those forums and that users not in your admin or mod groups don't have permission to view threads in those forums. Also be sure that "Use custom settings" at the top of the forum permissions page is checked (that seems to be a very common thing that is overlooked. ;))
Its not a permissions problem, since if the user Clicks on the link It displays the No Permissions Screen. And Im certain that users cant see my private forums.

Secondly, I just tested by logging on as a Guest, and it still shows me threads from my Mod forum only on the latest threads...

So, I think changing the query of ading some condition based on usergroupid seems like the only choice.

Thanks for the help anyway, Tigga :)

KuraFire 05-06-2003 07:26 AM

Quote:

Today at 09:28 AM Robink said this in Post #123
Its not a permissions problem, since if the user Clicks on the link It displays the No Permissions Screen. And Im certain that users cant see my private forums.

Just outta curiosity, but did you check that too?

Did you install any hack that involved your forums listing or the forum table? Or something with Host masks etc. ?

SOMETHING that might've altered your permissions structure to work differently from most boards? Cos it works for everyone else, the permission section...

Tigga 05-06-2003 11:32 AM

Quote:

Today at 03:28 AM Robink said this in Post #123
Its not a permissions problem, since if the user Clicks on the link It displays the No Permissions Screen. And Im certain that users cant see my private forums.
You should still double check the permissions. That's a common problem people seem to have with mYvBindex, and every time it's because they don't have the permissions set properly, or they forgot to hit the "Use custom settings" button at the top. IIRC Kurafire and I use about the same method for forum permissions and it does work, but only if the permissions are set as they should be, so I'd be willing to bet that's what your problem is.

KuraFire 05-06-2003 12:55 PM

Quote:

Today at 02:32 PM Tigga said this in Post #125
You should still double check the permissions. That's a common problem people seem to have with mYvBindex, and every time it's because they don't have the permissions set properly, or they forgot to hit the "Use custom settings" button at the top. IIRC Kurafire and I use about the same method for forum permissions and it does work, but only if the permissions are set as they should be, so I'd be willing to bet that's what your problem is.

Yeah, and it works for everyone else, and it's (I think) mostly the same section of code to check for permissions as is used in vB's own files... :/

Crazy Pete 05-06-2003 01:38 PM

Quote:

Yesterday at 09:03 PM KuraFire said this in Post #122
this hack is a standalone, not usable as a portable hack.

If you want to include it, you'll just have to copy - paste the code for JUST THE NEWS stuff only, and hook that up into your non-forum page script.

Hmm, well I tried doing that and I got this:

Fatal error: Call to a member function on a non-object in /home/pete/public_html/testindex.php on line 117

The line in question is...

$newsql = $DB_site->query("SELECT t.threadid as tid, t.title as ttitle, t.replycount as treply, t.postusername as user, t.postuserid as userid, t.dateline as dateline, MIN(p.postid) as postid FROM thread t LEFT JOIN post p USING (threadid) WHERE forumid=$newsforum GROUP BY t.threadid ORDER BY t.threadid DESC LIMIT $newslimit");

KuraFire 05-06-2003 03:42 PM

that means you're not using the vBulletin engine in your non-forum page.

(I think) :D

mossyuk 05-07-2003 09:20 AM

is there no way to make it so it doesnt have to be in the /forums/ directory? I use individual team pages on my Intranet and I would like to use this script for each team but so far havent figured out how :(

Robink 05-07-2003 09:22 AM

Quote:

Yesterday at 07:02 PM Tigga said this in Post #125
so I'd be willing to bet that's what your problem is.
You win the bet!!

The problem was that in the catagory, I set it that Registered users and guest cant see the catagory alltogether. But I hadnt set the Forum permissions. After I went and set it, the problem dissappeared! :D :D

Now the newsportal works like a charm, which I am using as my home page portal...

This is my favourite hack! Thanks KuraFire... Now my profile says that this is my fav hack too :D

KuraFire 05-07-2003 01:24 PM

Cheers, Robink, glad you got it working :)

mossyuk -> it doesn't really have to be in your forums/ directory. Mine isn't. However, it's necessary that you adjust your vB engine/code so that it can do non-vB pages retaining vB styles.

K33nny 05-18-2003 10:22 PM

What files would you have to edit to do that kurafire?

KuraFire 05-19-2003 08:33 AM

I don't remember, really... at least global.php but you might also have to edit functions.php and some more files, I dunno...

noppid 05-19-2003 05:24 PM

If I understand correctly, you're trying to run the page or code in a folder other then the forums folder. If so try the PHP chdir() fucnction in the php page to get there.

Asterik 10-21-2003 01:15 AM

i don't know if this has been answered or not but, is there anyway to put in the person's avatar with their post? =) that would make this thing perfect!!

KuraFire 10-21-2003 08:22 AM

Asterik: If you can wait till the vB3-version, that would help, because I don't think I'll be adding avatars to this vB2-version. the vB3 version of the Newsportal will be incredibly powerful and flexible, and also hold a lot more stuff like avatars and what not :)

Asterik 10-21-2003 11:01 AM

yes, i can wait.... if i must ;) lol

NuclioN 10-22-2003 02:32 PM

Is it possible to make this work?:

--text--

[ attachment ]

--text--

Because we use the attachment hack where you can put the attachment between text. :) Great hack even without avatars. Clicks install.

KuraFire 10-22-2003 02:45 PM

Eh, you want me to support the Put Attachments Between Text hack in this?

Point me to it and I might well consider it for the vB3 Version :)

soulviv3r.php 11-07-2003 08:41 AM

i am getting this error with it Database error in vBulletin 2.3.2:

Invalid SQL: SELECT pagetext,postid FROM post WHERE postid IN () ORDER BY postid DESC
mysql error: You have an error in your SQL syntax near ') ORDER BY postid DESC' at line 1

mysql error number: 1064

Date: Friday 07th of November 2003 05:42:42 AM
Script: http://nbk-gaming.net/lounge/lounge/newsportal.php
Referer:

KuraFire 11-07-2003 01:50 PM

Quote:

Originally Posted by soulviv3r.php
i am getting this error with it Database error in vBulletin 2.3.2:

Invalid SQL: SELECT pagetext,postid FROM post WHERE postid IN () ORDER BY postid DESC
mysql error: You have an error in your SQL syntax near ') ORDER BY postid DESC' at line 1

mysql error number: 1064

Date: Friday 07th of November 2003 05:42:42 AM
Script: http://nbk-gaming.net/lounge/lounge/newsportal.php
Referer:

Have you specified the right forumid ?

I think you're somehow getting 0 newsposts back...

Rampag33 11-08-2003 01:59 PM

Thi is definitely the thing I've been looking for for a long time. All the other news/portal haccs add way more then I needed this is perfect thx

install.

KuraFire 11-08-2003 04:45 PM

Quote:

Originally Posted by Rampag33
Thi is definitely the thing I've been looking for for a long time. All the other news/portal haccs add way more then I needed this is perfect thx

install.

You'll like my vB3 version, then :)

kuska 01-07-2004 09:10 AM

I have the same problem as suvir3.php

Database error in vBulletin 2.3.0:

Invalid SQL: SELECT pagetext,postid FROM post WHERE postid IN () ORDER BY postid DESC
mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY postid DESC' at line 1

mysql error number: 1064

Date: Wednesday 07th of January 2004 06:09:13 AM
Script: http://www.nakazdytemat.com/newsportal.php
Referer:

:( It was working fine till now. I have not made any changes to my board what so ever :( And the forim ID is correct :(

KuraFire 01-07-2004 09:44 AM

You'll have to wait for the vB3 version of this hack, as I've stopped support for the vB2 one...

tim|evo 01-08-2004 09:57 PM

Absolutely brilliant hack. Have ripped it apart and put it on my homepage, hope you dont mind... www.uxfest.org

Cheers.

KuraFire 01-09-2004 08:03 AM

Not at all, thanks, glad you like it :)

jojok 01-13-2004 12:45 AM

Database error in vBulletin 2.3.4:

Invalid SQL: SELECT pagetext,postid FROM post WHERE postid IN () ORDER BY postid DESC
mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY postid DESC' at line 1

mysql error number: 1064

Date: Monday 12th of January 2004 09:53:19 PM
Script: http://www.treehillhigh.net/forum/forum/newsportal.php
Referer: http://treehillhigh.net/forum/newsportal.php

That script URL is wrong. How can I change it?

KuraFire 01-14-2004 08:56 PM

Quote:

Originally Posted by jojok
Database error in vBulletin 2.3.4:

Invalid SQL: SELECT pagetext,postid FROM post WHERE postid IN () ORDER BY postid DESC
mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY postid DESC' at line 1

mysql error number: 1064

Date: Monday 12th of January 2004 09:53:19 PM
Script: http://www.treehillhigh.net/forum/forum/newsportal.php
Referer: http://treehillhigh.net/forum/newsportal.php

That script URL is wrong. How can I change it?

Idunno, that script error is not related to my newsportal though..

jojok 01-14-2004 09:18 PM

Yes it is.

KuraFire 01-14-2004 09:36 PM

The error in the errormessage isn't, the fact that you get that error is probably due to a weird upgrade of the Newsportal (that or the basic install has a fault and is dependant on the earlier install, I can't say by head anymore :/)

KuraFire 01-18-2004 10:30 AM

Quote:

Originally Posted by Walab
I had the exact same error message, my solution was simple, changed it to this.

$get = $DB_site->query("SELECT pagetext, postid FROM post");

ehm, that will get random posts from your post table! - you will not want that!


edit: I see you removed your post - realized that it wasn't doing what you wanted it to? :)


All times are GMT. The time now is 08:17 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.01493 seconds
  • Memory Usage 1,815KB
  • 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
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (32)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