Topic as weblink on phpbb orion 2.*.*

Allgemeiner Support zum phpBB 2 Board und phpBB 2 Modifikationen
Forumsregeln
Auch wenn hier der Support für phpBB 2 weiterhin aufrecht erhalten bleibt, weisen wir darauf hin, dass das phpBB 2 nicht mehr offiziell unterstützt und weiterentwickelt wird!
Antworten
Dtk
Beiträge: 7
Registriert: Fr 30.Sep, 2005 17:20

Topic as weblink on phpbb orion 2.*.*

Beitrag von Dtk »

Your phpBB Version: Orion NG(se) (1.9.x)
MODs: No
Your knowledge: Beginner
Boardlink: http://www.community.cback.de/viewtopic.php?t=3396

PHP Version: Latest
MySQL Version: Unkbow


What have you done before the problem was there?
Seached for similair name and lines asked on the original creater of my board cback.de


What have you already tryed to solve the problem?
added the lines on fethpost.php somewhere



Description and Message

Hello to prevent double posting of my error I added the link to cbacks website where the post already is posted.

I describe it in small,
I installer the mod but I want to know how I can add it into the index.php.
And how I can add a counter to that link just like the one cback has.
And how can implement this small mod Delete Topic Title from ezPortal if they are weblinks.
Because I see nothing similar in the fetchpost.php


I hope you can help me out.


Thanks in advanced

Link to the same topic at cback place

http://www.community.cback.de/viewtopic.php?t=3396

Regards,

Patrick
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Try this:

Code: Alles auswählen

# 
#-----[ OPEN ]-------------------------------------------------- 
# 
index.php

# 
#-----[ FIND ]-------------------------------------------------- 
# 
 		$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id, t.topic_title, t.topic_last_post_id " .

# 
#-----[ IN-LINE FIND ]-------------------------------------------------- 
# 
p.post_time

# 
#-----[ IN-LINE AFTER ADD ]-------------------------------------------------- 
#
, pt.post_text

# 
#-----[ IN-LINE FIND ]-------------------------------------------------- 
# 
t.topic_last_post_id

# 
#-----[ IN-LINE AFTER ADD ]-------------------------------------------------- 
#
, t.topic_type

# 
#-----[ FIND ]-------------------------------------------------- 
# 
			" FROM ((( " . FORUMS_TABLE . " f " .

# 
#-----[ REPLACE WITH ]-------------------------------------------------- 
# 
			" FROM (((( " . FORUMS_TABLE . " f " .
			" LEFT JOIN " . POSTS_TEXT_TABLE . " pt ON pt.post_id = p.post_id )" .

# 
#-----[ FIND ]------------------------------------------------ 
# 
		$last_post_time = create_date($board_config['default_dateformat'], $forum_data[$j]['post_time'], $board_config['board_timezone']);
		$last_post = '<a href="' . append_sid("viewtopic.$phpEx?"  . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '" title="' . $topic_title2 . '">' . $topic_title . '</a><br>';
		$last_post .= $last_post_time . '&nbsp;<a href="' . append_sid("viewtopic.$phpEx?"  . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '"></a><br>' . $lang['by'] . '&nbsp;';
		$last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '='  . $forum_data[$j]['user_id']) . '">' . $forum_data[$j]['username'] . '</a> ';

# 
#-----[ REPLACE WITH ]------------------------------------------------ 
# 
		if ( $forum_data[$j]['topic_type'] == POST_TITLE_LINK )
		{
			$topic_edit = ( $userdata['user_level'] == ADMIN || $userdata['user_level'] == MOD ) ? '&nbsp;&nbsp;&nbsp;<a href="'.$view_topic_url.'" class="nav"><img src="'.$images['icon_edit'].'" border="0" /></a>' : '';

			$sql = "SELECT post_text FROM " . POSTS_TEXT_TABLE . "
				WHERE post_id = ".$topic_rowset[$i]['topic_first_post_id'];
			if ( !$result = $db->sql_query($sql) )
			{
				message_die(GENERAL_ERROR, 'Could not create topic title weblink', '', __LINE__, __FILE__, $sql);
			}

			while ( $row = $db->sql_fetchrow($result) )
			{
				$view_topic_url = $row['post_text'];
			}

			$db->sql_freeresult($result);

			$last_post = $forum_data[$j]['post_text'];
			$last_post_time = '';
		}
		else
		{
			$last_post_time = create_date($board_config['default_dateformat'], $forum_data[$j]['post_time'], $board_config['board_timezone']);
			$last_post = '<a href="' . append_sid("viewtopic.$phpEx?"  . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '" title="' . $topic_title2 . '">' . $topic_title . '</a><br>';
			$last_post .= $last_post_time . '&nbsp;<a href="' . append_sid("viewtopic.$phpEx?"  . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '"></a><br>' . $lang['by'] . '&nbsp;';
			$last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '='  . $forum_data[$j]['user_id']) . '">' . $forum_data[$j]['username'] . '</a> ';
		}


# 
#-----[ SAVE/CLOSE ALL FILES ]-------------------------------------------------- 
# 
# EoM
Zuletzt geändert von oxpus am So 04.Dez, 2005 23:30, insgesamt 1-mal geändert.
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
Dtk
Beiträge: 7
Registriert: Fr 30.Sep, 2005 17:20

Beitrag von Dtk »

Sry that din't work i getthis error when i open index.php on my board

Code: Alles auswählen

Could not query forums information

DEBUG MODE

SQL Error : 1054 Unknown column 'p.post_text' in 'field list'

SELECT f.*, p.post_time, p.post_text, p.post_username, u.username, u.user_id, t.topic_title, t.topic_last_post_id, t.topic_type FROM ((( phpbb_forums f LEFT JOIN phpbb_posts p ON p.post_id = f.forum_last_post_id ) LEFT JOIN phpbb_users u ON u.user_id = p.poster_id ) LEFT JOIN phpbb_topics t ON t.topic_last_post_id = p.post_id ) ORDER BY f.cat_id, f.forum_order

Line : 169
File : index.php
 

Regards,

Patrick
Dtk
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

I'd update the code...
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
Dtk
Beiträge: 7
Registriert: Fr 30.Sep, 2005 17:20

Beitrag von Dtk »

Sry oxpus now i get a other error :confused:

Code: Alles auswählen

Could not query forums information

DEBUG MODE

SQL Error : 1120 Cross dependency found in OUTER JOIN. Examine your ON conditions

SELECT f.*, p.post_time, pt.post_text, p.post_username, u.username, u.user_id, t.topic_title, t.topic_last_post_id, t.topic_type FROM (((( phpbb_forums f LEFT JOIN phpbb_posts_text pt ON pt.post_id = p.post_id ) LEFT JOIN phpbb_posts p ON p.post_id = f.forum_last_post_id ) LEFT JOIN phpbb_users u ON u.user_id = p.poster_id ) LEFT JOIN phpbb_topics t ON t.topic_last_post_id = p.post_id ) ORDER BY f.cat_id, f.forum_order

Line : 170
File : index.php
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Please attach the index.php (AS ZIP!) to take a look.
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
Dtk
Beiträge: 7
Registriert: Fr 30.Sep, 2005 17:20

Beitrag von Dtk »

Oke Thank you this is my index.php
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Okay, try this (I think, some mysql releases will work this way):
Find

Code: Alles auswählen

" LEFT JOIN " . POSTS_TEXT_TABLE . " pt ON pt.post_id = p.post_id )" .
" LEFT JOIN " . POSTS_TABLE . " p ON p.post_id = f.forum_last_post_id )" .
and replace these lines with

Code: Alles auswählen

" LEFT JOIN " . POSTS_TABLE . " p ON p.post_id = f.forum_last_post_id )" .
" LEFT JOIN " . POSTS_TEXT_TABLE . " pt ON pt.post_id = p.post_id )" .
Zuletzt geändert von oxpus am Mo 05.Dez, 2005 23:21, insgesamt 1-mal geändert.
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
Dtk
Beiträge: 7
Registriert: Fr 30.Sep, 2005 17:20

Beitrag von Dtk »

Thanks m8 i get no error but to enable the weblink where can i do that because that option is gone ^6 well maybe i still need to insert it hardcored and not a weblink dunno why it is not working.
Maybe you could make it compatible with orion someday?


Regards,
Dtk
Patrick
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

If I'd time for it.
But CBack knows his phpBB better than me ;)
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
aslan
Beiträge: 30
Registriert: Mo 25.Jul, 2005 15:24

Beitrag von aslan »

ist er hier auch aktiv?
Dtk
Beiträge: 7
Registriert: Fr 30.Sep, 2005 17:20

Beitrag von Dtk »

Thanks oxpus,

Well i just drop by in these day's.
I solve it on a other way but great mod thanks for sharing it.


Regards,

Patrick
Dtk
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

@aslan
Nein, hier nicht.

@Dtk
Thx...
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
Antworten