[2.0.20] Topic Description

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
34
69%
Very Good
7
14%
Good
3
6%
Fair
0
No votes
Poor
5
10%
 
Total votes: 49

Wyvers
Registered User
Posts: 14
Joined: Sat Mar 11, 2006 10:39 pm

Post by Wyvers »

Worked great, thanks!
Suetan
Registered User
Posts: 77
Joined: Sun Jan 25, 2004 12:09 am
Location: My house
Contact:

Post by Suetan »

I'm having a problem where it's got a "Postparse tooltip" link under the topic description.

Other MODs Installed: Profile Control Panel, Simple Subforms, Extreme Styles
Templates used: BBLite (non-flash), BBTech (non-flash), subSilver
phpBB Version: 2.0.20
Link: http://www.gaminunlimited.net/mb

*NOTE*
I removed the first post javascript since I didn't need it
*END NOTE*
User avatar
Makc666
Registered User
Posts: 358
Joined: Fri Mar 07, 2003 12:03 pm
Location: MSK-RU
Name: Maxim
Contact:

Post by Makc666 »

Suetan wrote: I'm having a problem where it's got a "Postparse tooltip" link under the topic description.


I didn't understand what is your problem...
Maybe you will find your answer here:
http://www.phpbb.com/phpBB/viewtopic.ph ... 04#2118204
Gravitron
Registered User
Posts: 11
Joined: Thu Jun 01, 2006 4:32 pm

Post by Gravitron »

I get this error with EM:
Critical Error

FIND FAILED: In file [admin/admin_forumauth.php] could not find:

// View Read Post Reply Edit Delete Sticky Announce Vote Poll

MOD script line #1426 :: FAQ :: Report
NewGuy2006
Registered User
Posts: 64
Joined: Mon May 01, 2006 1:29 am

Post by NewGuy2006 »

I could use some help. Just installed this mod with EasyMod 0.30, without errors, but when I try to access any of the forums, the following error message is returned:
Could not obtain topic information

DEBUG MODE

SQL Error : 1066 Not unique table/alias: 'pt'

SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_time, p.post_username, pt.bbcode_uid, pt.* FROM phpbb_topics t, phpbb_users u, phpbb_posts p, phpbb_users u2, phpbb_posts_text pt, phpbb_posts_text pt WHERE t.forum_id = 2 AND t.topic_poster = u.user_id AND p.post_id = t.topic_last_post_id AND p.poster_id = u2.user_id AND t.topic_type = 2 AND t.topic_first_post_id = pt.post_id AND pt.post_id = t.topic_first_post_id AND p.post_draft = 0 ORDER BY t.topic_priority DESC, t.topic_last_post_id DESC

Line : 437
File : viewforum.php


What did I do wrong and how can I fix this?

Thanks much,

Brian
Swizec
Former Team Member
Posts: 1701
Joined: Mon Mar 10, 2003 9:42 pm
Location: Slovenia
Contact:

Post by Swizec »

@Gravitron: do you have a mods usch as Categories Hierarchy installed? Or any of the same author?

@NewGuy: what other mods do you have installed?
NewGuy2006
Registered User
Posts: 64
Joined: Mon May 01, 2006 1:29 am

Post by NewGuy2006 »

Swizec wrote: @NewGuy: what other mods do you have installed?

There are 30 mods installed prior to attempting yours (#11 was removed):

Image

Brian
Swizec
Former Team Member
Posts: 1701
Joined: Mon Mar 10, 2003 9:42 pm
Location: Slovenia
Contact:

Post by Swizec »

Can't say exactly which mod is at fault, but change that query so it reads something like so

Code: Select all

SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_time, p.post_username, pt.bbcode_uid, pt.* FROM phpbb_topics t, phpbb_users u, phpbb_posts p, phpbb_users u2, phpbb_posts_text pt WHERE t.forum_id = 2 AND t.topic_poster = u.user_id AND p.post_id = t.topic_last_post_id AND p.poster_id = u2.user_id AND t.topic_type = 2 AND t.topic_first_post_id = pt.post_id AND pt.post_id = t.topic_first_post_id AND p.post_draft = 0 ORDER BY t.topic_priority DESC, t.topic_last_post_id DESC
In short, the table phpbb_posts_text is define twice and doesn't need to be.Don't know exactly what this looks like in the php code off the top of me head.
NewGuy2006
Registered User
Posts: 64
Joined: Mon May 01, 2006 1:29 am

Post by NewGuy2006 »

Swizec wrote: Can't say exactly which mod is at fault, but change that query so it reads something like so


Unfortunately, that didn't work. It produced the following error:
Parse error: parse error, unexpected T_STRING in /home/Brian/public_html/BKUP3/viewforum.php on line 457


I don't know anything about this, but if I am understanding the original error code, it's saying that the alias "pt" is not unique; right? So, instead of using the alias, if I just substituted pt with the full name of the table, wouldn't that work (as I'm sure all my table names have to be unique)? I assume "pt" stands for post_topic, is that correct?

Brian
Swizec
Former Team Member
Posts: 1701
Joined: Mon Mar 10, 2003 9:42 pm
Location: Slovenia
Contact:

Post by Swizec »

Pt stands for posts_text.

And uhm... you should something like "POSTS_TEXT_TABLE pt" twice in the query... remove one of them.

But be careful about producing syntax errors with doing so.

If you really cant' pull it off, just paste the whole query here and I'll edit it for you :)
NewGuy2006
Registered User
Posts: 64
Joined: Mon May 01, 2006 1:29 am

Post by NewGuy2006 »

That's very kind of you Swizec. Let me see what I can do and if I can't do it, I'll take you up on your offer.

Kind regards,

Brian
NewGuy2006
Registered User
Posts: 64
Joined: Mon May 01, 2006 1:29 am

Post by NewGuy2006 »

Well, it was a gallant attempt but trying to edit the file manually didn't work.

Here is the code in question from my viewforum.php file before trying to add your code:

Code: Select all

//
// All announcement data, this keeps announcements
// on each viewforum page ...
//
$sql = "SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_time, p.post_username, pt.*
	FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . USERS_TABLE . " u2, " . POSTS_TEXT_TABLE . " pt
	WHERE t.forum_id = $forum_id
		AND t.topic_poster = u.user_id
		AND p.post_id = t.topic_last_post_id
		AND p.poster_id = u2.user_id
		AND t.topic_type = " . POST_ANNOUNCE . "
		AND pt.post_id = t.topic_first_post_id

		AND p.post_draft = 0

	ORDER BY t.topic_priority DESC, t.topic_last_post_id DESC ";
//
// Grab all the basic data (all topics except announcements)
// for this forum
//
$sql = "SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_username, p2.post_username AS post_username2, p2.post_time, pt.*
	FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " u2, " . POSTS_TEXT_TABLE . " pt
	WHERE t.forum_id = $forum_id
		AND t.topic_poster = u.user_id
		AND p.post_id = t.topic_first_post_id
		AND p2.post_id = t.topic_last_post_id
		AND u2.user_id = p2.poster_id
		AND t.topic_type <> " . POST_ANNOUNCE . "
		AND pt.post_id = t.topic_first_post_id

		AND p.post_draft = 0

		$limit_topics_time
	ORDER BY t.topic_type DESC, t.topic_priority DESC, t.topic_last_post_id DESC
	LIMIT $start, ".$board_config['topics_per_page'];
Mind giving the code of those two queries after you add this mod?

Thanks
(that way I'll just edit it and you copy/paste it back in)
NewGuy2006
Registered User
Posts: 64
Joined: Mon May 01, 2006 1:29 am

Post by NewGuy2006 »

Okay, he is that section of code with the changes incorporated:
// mod topic description: add to query
$sql = "SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_time, p.post_username, pt.bbcode_uid, pt.*
FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . USERS_TABLE . " u2, " . POSTS_TEXT_TABLE . " pt, " . POSTS_TEXT_TABLE . " pt
WHERE t.forum_id = $forum_id
AND t.topic_poster = u.user_id
AND p.post_id = t.topic_last_post_id
AND p.poster_id = u2.user_id
AND t.topic_type = " . POST_ANNOUNCE . "
AND t.topic_first_post_id = pt.post_id
AND pt.post_id = t.topic_first_post_id

AND p.post_draft = 0

ORDER BY t.topic_priority DESC, t.topic_last_post_id DESC ";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain topic information', '', __LINE__, __FILE__, $sql);
}

$topic_rowset = array();
$total_announcements = 0;
while( $row = $db->sql_fetchrow($result) )
{
$topic_rowset[] = $row;
$total_announcements++;
}

$db->sql_freeresult($result);

//
// Grab all the basic data (all topics except announcements)
// for this forum
//
// mod topic description: add to query
$sql = "SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_username, p2.post_username AS post_username2, p2.post_time, pt.bbcode_uid, pt.*
FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " u2, " . POSTS_TEXT_TABLE . " pt, " . POSTS_TEXT_TABLE . " pt
WHERE t.forum_id = $forum_id
AND t.topic_poster = u.user_id
AND p.post_id = t.topic_first_post_id
AND p2.post_id = t.topic_last_post_id
AND u2.user_id = p2.poster_id
AND t.topic_type <> " . POST_ANNOUNCE . "
AND t.topic_first_post_id = pt.post_id
AND pt.post_id = t.topic_first_post_id

AND p.post_draft = 0

$limit_topics_time
ORDER BY t.topic_type DESC, t.topic_priority DESC, t.topic_last_post_id DESC
LIMIT $start, ".$board_config['topics_per_page'];
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain topic information', '', __LINE__, __FILE__, $sql);
}
NewGuy2006
Registered User
Posts: 64
Joined: Mon May 01, 2006 1:29 am

Post by NewGuy2006 »

Having laid it out in this manner, I was able to see the dual instances of Post_text and I did sucessfully remove them.

Then, having solved that problem, I ran into this:
DEBUG MODE

SQL Error : 1054 Unknown column 'f.auth_desc' in 'field list'

SELECT f.auth_desc, f.auth_moddesc FROM phpbb_forums f WHERE f.forum_id=4 LIMIT 0,1

Line : 61
File : functions_desc.php


Which led me to realize that EasyMod failed to execute the last 9 lines of SQL code (which I then did manually).

This is the last time I use EasyMod for database table alterations.

Thanks for all your time--it seems to be working now.

Brian
NewGuy2006
Registered User
Posts: 64
Joined: Mon May 01, 2006 1:29 am

Latest Problem

Post by NewGuy2006 »

Looks like I spoke too soon.

When I attempt to turn on descriptions from within the ACP (or make any other changes), none of my changes are written. I click submit and then the changes default right back to where they were (with descriptions still turned off).

What's wrong and how do I fix this?

Brian
Post Reply

Return to “[2.0.x] MOD Database Releases”