Previous Thread
Next Thread
Print Thread
Rating: 8
Page 1 of 2 1 2
#225320 09/26/2002 10:04 AM
Joined: Jun 2002
Posts: 125
Journeyman
Journeyman
Offline
Joined: Jun 2002
Posts: 125
Hi,
to the Addons I have a question: How can I let the last forum contributions indicate, without contributions are indicated of the private forums with?

Sorry for the Babelfish-Translation.

Sponsored Links
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
I think what your saying is how can you allow the viewing of information in private forums without the forums being accessable?

I may have missed the mark on this so please excuse me if I did. I really regret not learning a second language or two.

Although when stationed in Germany I learned enough to get around at the time... lol

Joined: Jun 2002
Posts: 125
Journeyman
Journeyman
Offline
Joined: Jun 2002
Posts: 125
No, which is not completely which I would like. I would like that visitors are not announced in the forum, who cannot see Postings of the private forums on their own index side.

An Example --> http://www.mysterynews.net/mysterynews/

It's Babelfish-Translation too.

[Edit]"Neue Webseite" is a posting from a private Forum. This posting its showing for all people, who connect to my site, but its not accessable. It would be nice, when this posting not showing to all peoples

Last edited by Grummel; 09/26/2002 10:25 AM.
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
I think I got it now... (I hope)

Only members with access see other members with the same access?


If this is correct, in what addon?

Joined: Jun 2002
Posts: 125
Journeyman
Journeyman
Offline
Joined: Jun 2002
Posts: 125
Not realy...
I mean topics not members. one the mainpage i can show last x topics with ubbttopthreads.php. In this numbers of topics are all topics from the forums (private or not private). It would be nice, when only the not private topics are showing.

I hope you can understand these better, its not Babelfish-Translation.

Sponsored Links
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
ahhh ok understood.

Is this something your looking for as a feature in IIP's news display? What addon in particular does this need to be done for?

Joined: Jun 2002
Posts: 125
Journeyman
Journeyman
Offline
Joined: Jun 2002
Posts: 125
Hmmm, i need this feature for the separate file ubbttopthreads.php for my selfmade HTML-Site. I dont need the IIP or something else.

Many sites have the same look, how looking IIP 5.0. I will make my own Index-Site.

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Ohhh them addons... (I forget about them ones) lol

I'll put some code together as soon as I can that will check the viewers access and display accordingly.

Joined: Jun 2002
Posts: 125
Journeyman
Journeyman
Offline
Joined: Jun 2002
Posts: 125
That would be nice. Many thanks from Germany.

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
In your ubbttopthreads.php addon find this:

code:

// -----------------------------
// End of the variables section
require("$path/main.inc.php");



and change it to this:

code:

// -----------------------------
// End of the variables section
require_once("$path/main.inc.php");
$userob = new user;
$user = $userob -> authenticate("U_Groups");
if ($user['U_Username']) {
$Grouparray = split("-",$user['U_Groups']);
$gsize = sizeof($Grouparray);
$groupquery = "AND (";
$g = 0;
for ($i=0; $i<$gsize;$i++) {
if (!preg_match("/[0-9]/",$Grouparray[$i])) { continue; };
$g++;
if ($g > 1) {
$groupquery .= " OR ";
}
$groupquery .= "Bo_Read_Perm LIKE '%-$Grouparray[$i]-%'";
}
$groupquery .= ")";
}
else {
$groupquery = "AND Bo_Read_Perm LIKE '%-4-%'";
}




Then find this:

code:

$query = "
SELECT B_Number,B_Posted,B_Last_Post,B_Username,B_Subject,B_Body,B_Main,B_Replies,B_Counter,B_Board
FROM {$config['tbprefix']}Posts
WHERE B_Number = B_Main
AND B_Last_Post > '$date'
ORDER BY $sort DESC
LIMIT $totalthreads
";



and change it to this:

code:

$query = "
SELECT B_Number,B_Posted,B_Last_Post,B_Username,B_Subject,B_Body,B_Main,B_Replies,B_Counter,B_Board
FROM {$config['tbprefix']}Posts
WHERE B_Number = B_Main
AND B_Last_Post > '$date'
$groupquery
ORDER BY $sort DESC
LIMIT $totalthreads
";




Make sure your cookies are set site wide so that this script can authenticate the viewer if this is placed outside the .threads directory.


I haven't tested this but it should work.

Sponsored Links
Joined: Jun 2002
Posts: 125
Journeyman
Journeyman
Offline
Joined: Jun 2002
Posts: 125
There is an error:

[] SQL ERROR: Unable to do_query: SELECT B_Number, B_Posted, B_Last_Post, B_Username, B_Subject, B_Body, B_Main, B_Replies, B_Counter, B_Board FROM Posts WHERE B_Number = B_Main AND B_Last_Post > '1032462921' AND Bo_Read_Perm LIKE '%-4-%' ORDER BY B_Counter DESC LIMIT 10
Table 'xxxxxxxx.Posts' doesn't exist

Warning: Supplied argument is not a valid MySQL result resource in /xxxxxxxxx/webseiten/forum/mysql.inc.php on line 83
[/]

I have UBB Threads 6.0.3 installed.
I hope you can help me.

Last edited by Grummel; 09/26/2002 2:41 PM.
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Sorry, the code I posted was for 6.1's addon.

Replace this:

FROM {$config['tbprefix']}Posts


to this:

FROM w3t.Posts




In that code.

Joined: Jun 2002
Posts: 125
Journeyman
Journeyman
Offline
Joined: Jun 2002
Posts: 125
I got another error:

[] Warning: Cannot add header information - headers already sent by (output started at /xxxxxxx/webseiten/mysterynews/index.php:2) in /xxxxxxx/webseiten/forum/ubbt.inc.php on line 1664
SQL ERROR: Unable to do_query: SELECT B_Number,B_Posted,B_Last_Post,B_Username,B_Subject,B_Body,B_Main,B_Replies,B_Counter,B_Board FROM w3t.Posts WHERE B_Number = B_Main AND B_Last_Post > '1032464179' AND (Bo_Read_Perm LIKE '%-3-%' OR Bo_Read_Perm LIKE '%-2-%' OR Bo_Read_Perm LIKE '%-5-%') ORDER BY B_Counter DESC LIMIT 10
Access denied for user: 'xxxxxxx@localhost' to database 'w3t' [/]

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
The query looks good. Possibly there's an extra space after the ?> closing tag?

I'm sort of at a loss on this one

Joined: Jun 2002
Posts: 125
Journeyman
Journeyman
Offline
Joined: Jun 2002
Posts: 125
Hmm, there isnt a space after the closing tag.

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Try the addon on a blank page and see if it works. Possibly something else causing it?

Anyone else have an idea of what could be going on?

Joined: Jun 2002
Posts: 125
Journeyman
Journeyman
Offline
Joined: Jun 2002
Posts: 125
On a blank page there is the same problem.

[Edit] The original Code from the file is:

[] $query = "
SELECT B_Number,B_Posted,B_Last_Post,B_Username,B_Subject,B_Body,B_Main,B_Replies,B_Counter,B_Board
FROM w3t_Posts //<------------------ ????????
WHERE B_Number = B_Main
AND B_Last_Post > '$date'
ORDER BY $sort DESC
LIMIT $totalthreads
"; [/]

Last edited by Grummel; 09/26/2002 3:46 PM.
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
code:

$query = "
SELECT B_Number,B_Posted,B_Last_Post,B_Username,B_Subject,B_Body,B_Main,B_Replies,B_Counter,B_Board
FROM w3t_Posts
WHERE B_Number = B_Main
AND B_Last_Post > '$date'
$groupquery
ORDER BY $sort DESC
LIMIT $totalthreads
";



Should be the code to use for the query.

Joined: Jun 2002
Posts: 125
Journeyman
Journeyman
Offline
Joined: Jun 2002
Posts: 125
Hmm, there is now another error:

[] Warning: Cannot add header information - headers already sent by (output started at /xxxxxxxxx/webseiten/mysterynews/test.php:10) in /xxxxxxxxx/webseiten/forum/ubbt.inc.php on line 1664
SQL ERROR: Unable to do_query: SELECT B_Number,B_Posted,B_Last_Post,B_Username,B_Subject,B_Body,B_Main,B_Replies,B_Counter,B_Board FROM w3t_Posts WHERE B_Number = B_Main AND B_Last_Post > '1032469385' AND (Bo_Read_Perm LIKE '%-3-%' OR Bo_Read_Perm LIKE '%-2-%' OR Bo_Read_Perm LIKE '%-5-%') ORDER BY B_Counter DESC LIMIT 10
Unknown column 'Bo_Read_Perm' in 'where clause'

Warning: Supplied argument is not a valid MySQL result resource in /xxxxxxxxx/webseiten/forum/mysql.inc.php on line 83 [/]

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
LoL hmmmm perhaps 6.0.x didn't have that column?

I'll have to dig out an old copy of 6.0.x and see what the groups are based on...


Will be a bit.

Joined: Jun 2002
Posts: 125
Journeyman
Journeyman
Offline
Joined: Jun 2002
Posts: 125
The problem is, there isnt a german copy for the 6.1 version. This version comes in the next few days, i hope.

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
I'll take a look at the previous version though and see what I may be missing.

Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
I believe that 'Bo_Read_Perm' is in the w3t_Boards table, not the w3t_Posts table. Maybe you need to do a join?

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Ack... your right Dave, and I should have seen that from the Bo_ portion of the field...

I'll look over that code again and do it right. I been doing to many things at the same time.

Thanks Dave

Joined: Jun 2002
Posts: 125
Journeyman
Journeyman
Offline
Joined: Jun 2002
Posts: 125
Ok, thanks for your great help.
I will go to bed now. The time here in Germany is 11:23pm, and i will sleeping now.

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
In your ubbttopthreads.php addon find this:

code:

// -----------------------------
// End of the variables section
require("$path/main.inc.php");



and change it to this:

code:

// -----------------------------
// End of the variables section
require_once("/ubbthreads/main.inc.php");

$userob = new user;
$user = $userob -> authenticate("U_Groups");
if ($user['U_Username']) {
$Grouparray = split("-",$user['U_Groups']);
$gsize = sizeof($Grouparray);
$groupquery = "(";
$g = 0;
for ($i=0; $i<$gsize;$i++) {
if (!preg_match("/[0-9]/",$Grouparray[$i])) { continue; };
$g++;
if ($g > 1) {
$groupquery .= " OR ";
}
$groupquery .= "Bo_Read_Perm LIKE '%-$Grouparray[$i]-%'";
}
$groupquery .= ")";
}
else {
$groupquery = "Bo_Read_Perm LIKE '%-4-%'";
}
$query = "
SELECT Bo_Keyword
FROM w3t_Boards
WHERE $groupquery
";
$sth = $dbh -> do_query($query);
$boardquery = "AND (";
$g = 0;
while (list ($BKeyword) = $dbh -> fetch_array($sth)) {
$g++;
if ($g > 1) {
$boardquery .= " OR ";
}
$boardquery .= "B_Board = '$BKeyword'";
}
$dbh -> finish_sth($sth);
$boardquery .= ")";
if (!$g) {
$boardquery = "";
}




Then find this:

code:

$query = "
SELECT B_Number,B_Posted,B_Last_Post,B_Username,B_Subject,B_Body,B_Main,B_Replies,B_Counter,B_Board
FROM w3t_Posts
WHERE B_Number = B_Main
AND B_Last_Post > '$date'
ORDER BY $sort DESC
LIMIT $totalthreads
";



and change it to this:

code:

$query = "
SELECT B_Number,B_Posted,B_Last_Post,B_Username,B_Subject,B_Body,B_Main,B_Replies,B_Counter,B_Board
FROM w3t_Posts
WHERE B_Number = B_Main
AND B_Last_Post > '$date'
$boardquery
ORDER BY $sort DESC
LIMIT $totalthreads
";




Ok, I just tested this on my local webserver and it worked fine. Hope it does for everyone else

Joined: Jun 2002
Posts: 125
Journeyman
Journeyman
Offline
Joined: Jun 2002
Posts: 125
Yeah, its work fine. Thanks for your great work.

Joined: Jun 2002
Posts: 125
Journeyman
Journeyman
Offline
Joined: Jun 2002
Posts: 125
Hi JustDave,

do you know, why i get this error message?

[] Warning: Cannot add header information - headers already sent by (output started at /xxxxxxxxx/webseiten/mysterynews/index.php:2) in /xxxxxxxxx/webseiten/forum/ubbt.inc.php on line 1664 [/]

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
I'm not sure what the cause would be. Usual problems are having a space after ?> closing tag and perhaps the setting of cookies could be interfering with thigns. If I could see the source code for the page in question I might be able to offer a better guess at what's going wrong.

Joined: Jun 2002
Posts: 125
Journeyman
Journeyman
Offline
Joined: Jun 2002
Posts: 125
On the index.php-file its only an include for the file ubbttopthreads.php

[] <?
include "/xxxxxxxxx/webseiten/forum/addons/ubbttopthreads.php";
?> [/]

How the cookies must setting?
On the Adminsite from ubbthreads i set the cookies with a slash "/".

I hope you can understand my bad english.

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Is that the only code on the index page? Or is there other html in use. Even sending a header with html can cause the problem. I don't think it's a problem with .threads cookies just that it's possible that your already setting cookie values with other code or something of that nature.

Joined: Jun 2002
Posts: 125
Journeyman
Journeyman
Offline
Joined: Jun 2002
Posts: 125
I will send you a private message with the complete code.

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
The code looks fine. What I think the problem is is that the new "top threads" script is checking user access which uses the .threads cookie. In all of the .threads scripts this is done *before* the call to send_header is executed.

Since you have this include after your html has sent the page header it may be causing a problem.

What may need to be done is to place the authentication call before the <html> tag.
You will also need to remove this code from the ubbttopthreads.php script being included.


<?
require_once("/ubbthreads/main.inc.php");
$userob = new user;
$user = $userob -> authenticate("U_Groups");
?>
<html>




Then include the ubbttopthreads.php script in the body.


<body>
<? include ("/ubbthreads/addons/ubbttopthreads.php"); ?>
</body>





I think this should work. I hope I wasn't to obscure in describing this.


Joined: Jun 2002
Posts: 125
Journeyman
Journeyman
Offline
Joined: Jun 2002
Posts: 125
It looks good so far. I will inform you, when i get an error. Thanks for your great work.

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Your Welcome

Joined: Jun 2002
Posts: 125
Journeyman
Journeyman
Offline
Joined: Jun 2002
Posts: 125
Ahhhhhhhhhhhhh, i will run amok. *grummel*

I got the same error message now at the top of the page, after i hit the reload-button in IE6.0 or Mozilla 1.1.

Hmmmm, now its running fine.
Im to stupid, i think.

Last edited by Grummel; 09/27/2002 1:18 PM.
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
LoL now I'm starting to draw blanks... anyone else have an idea as to why this may be happening?

Is this the same error... "headers already sent" ?

I'm running out of fuel here... lol

Joined: Jun 2002
Posts: 125
Journeyman
Journeyman
Offline
Joined: Jun 2002
Posts: 125
Yes it was the same error, but after clear all cookies from my computer, its now running fine, but how long?

Hmmm, after waiting a while, and after hit the reload-button, i got the same error "Cannot add header information - headers already sent by.... *blahblahblubb*

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
So perhaps it is a cookie issue? If you use the code on a blank page, with no other scripts being included does the error still occur?

Joined: Jun 2002
Posts: 125
Journeyman
Journeyman
Offline
Joined: Jun 2002
Posts: 125
The error message is also on my test.php-file. In that file is only the code and Standart-HTML-Code. (You got the code in the private message from me.)

Page 1 of 2 1 2

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Posts: 70
Joined: January 2007
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)