Beitrag nur mit Überschrift, ohne Text erlauben -> geht d
Verfasst: 15.08.2003 18:55
Wäre sinnvoll für ein Projekt
phpBB.de - Die deutsche phpBB-Community
https://www.phpbb.de/community/
Code: Alles auswählen
if (document.post.message.value.length < 2) {
formErrors = "{L_EMPTY_MESSAGE}";
}Code: Alles auswählen
else if ($mode != 'delete' && $mode != 'poll_delete')
{
$error_msg .= (!empty($error_msg)) ? '<br />' . $lang['Empty_message'] : $lang['Empty_message'];
}Code: Alles auswählen
#################################################################
## Mod Title: Mouse hover topic preview
## Mod Version: 1.0.5
## Author: Shannado - <sven@shannado.nl> - Sven - http://www.shannado.nl/forumorg
## Description: With this MOD an user can see preview, when he/she holds the mouse over the topic in viewforum
## It showes the first 200 characters of the LAST post.In the HOWTO is also described how to
## preview the FIRST post instead of the LAST Post.
## Also in the search result screen you can preview the post (only when viewing topics)
##
##
## Installation Level: Easy
## Installation Time: 5 Minutes
## Files To Edit: viewforum.php, viewforum_body.tpl, bbcode.php
## Included Files: N/A
##############################################################
## This MOD is released under the GPL License.
## Intellectual Property is retained by the MOD Author(s) listed above
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/downloads/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/downloads/
##############################################################
##
## Author Note:
## I have set a limit (200) on the number of characters show in the preview. You can adjust is yourself to anynumber.
## Replace the '200' with your number. In the following code lines:
## $topic_content = $topic_rowset[$i]['post_text'];
##
## if (strlen($topic_content) > 200)
## {
## $topic_content = substr($topic_content, 0, 200) . "...";
## }
## else
## {
## $topic_content = $topic_content;
## }
##
##
## If you want to preview the first post instead of the last. change the next lines in viewforum.php
## after you completed the HOW TO.
##
##
## [ FIND ]
##
## AND p.post_id = pt.post_id
##
## [ REPLACE WITH ]
##
## AND t.topic_first_post_id = pt.post_id
##
##
## [ FIND ]
## AND p2.post_id = t.topic_last_post_id
## AND p2.post_id = pt.post_id
##
## [ REPLACE WITH ]
## AND p2.post_id = t.topic_last_post_id
## AND p.post_id = pt.post_id
##
## Known Issues:
## - Smilies & HTML code visible in preview
##
##
##
## Compliant with phpBB v2.0.x
##
##
## History:
## ------------
## 0.9.0 beta
## - Beta
##
## 0.9.1 beta
## - BBCode was visible in the preview. BBCode will be stripped now
##
## 0.9.2 beta
## - Forgot the adjust the SQL statements
##
## 0.9.3 beta
## - Author notes extended with HOWTO preview always the first post
##
## 1.0.0 Final
## - Final
##
## 1.0.1 Final
## - Fixed preview FIRST post Announcement. The Annoucement disappear in the viewforum.
## The Authors Notes theerfor have been adjusted.
##
## 1.0.2 Final
## - Fixed typo in the HOWTO of the preview of the FIRST post
##
## 1.0.3 Final
## - Adjusted (make shorter) the strip_bbcode function in the bbcode.php file
##
## 1.0.4 Final
## - Text with double quotes was not displayed correctly
##
## 1.0.5 Final
## - Added to preview to the search result page (only when viewing topics)
#################################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
#################################################################
#
#-----[ OPEN ]------------------------------------------
#
include/bbcode.php
#
#-----[ FIND ]------------------------------------------
#
?>
#
#-----[ BEFORE, ADD ]------------------------------------------
#
//
// Mouse hover topic preview MOD - BEGIN
//
function bbencode_strip($message, $uid)
{
$message = strip_tags($message);
// url #2
$message = str_replace("[url]","", $message);
$message = str_replace("[/url]", "", $message);
// url /\[url=([a-z0-9\-\.,\?!%\*_\/:;~\\&$@\/=\+]+)\](.*?)\[/url\]/si
$message = preg_replace("/\[url=([a-z0-9\-\.,\?!%\*_\/:;~\\&$@\/=\+]+)\]/si", "", $message);
$message = str_replace("[/url:$uid]", "", $message);
$message = preg_replace("/\[.*?:$uid:?.*?\]/si", '', $message);
$message = preg_replace('/\[url\]|\[\/url\]/si', '', $message);
$message = str_replace('"', "'", $message);
return $message;
}
//
// Mouse hover topic preview MOD - END
//
#
#-----[ OPEN ]------------------------------------------
#
viewforum.php
#
#-----[ FIND ]------------------------------------------
#
include($phpbb_root_path . 'common.'.$phpEx);
#
#-----[ AFTER, ADD ]------------------------------------------
#
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
#
#-----[ FIND ]------------------------------------------
#
//
// 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
FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . USERS_TABLE . " u2
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 . "
#
#-----[ REPLACE WITH ]------------------------------------------
#
//
// 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.post_text, pt.bbcode_uid
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.post_id = pt.post_id
AND p.poster_id = u2.user_id
AND t.topic_type = " . POST_ANNOUNCE . "
#
#-----[ FIND ]------------------------------------------
#
//
// 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
FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " u2
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 . "
#
#-----[ REPLACE WITH ]------------------------------------------
#
//
// 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.post_text, pt.bbcode_uid
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 p2.post_id = pt.post_id
AND u2.user_id = p2.poster_id
AND t.topic_type <> " . POST_ANNOUNCE . "
#
#-----[ FIND ]------------------------------------------
#
$topic_title = ( count($orig_word) ) ? preg_replace($orig_word, $replacement_word, $topic_rowset[$i]['topic_title']) : $topic_rowset[$i]['topic_title'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
//
// Mouse hover topic preview MOD - BEGIN
//
$topic_content = $topic_rowset[$i]['post_text'];
$bbcode_uid = $topic_rowset[$i]['bbcode_uid'];
$topic_content = bbencode_strip($topic_content, $bbcode_uid);
if (strlen($topic_content) > 200)
{
$topic_content = substr($topic_content, 0, 200) . "...";
}
else
{
$topic_content = $topic_content;
}
//
// Mouse hover topic preview MOD - END
//
#
#-----[ FIND ]------------------------------------------
#
'TOPIC_TITLE' => $topic_title,
#
#-----[ AFTER, ADD ]------------------------------------------
#
'TOPIC_CONTENT' => $topic_content,
#
#-----[ OPEN ]------------------------------------------
#
templates/SubSilver/viewforum_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<td class="row1" width="100%"><span class="topictitle">{topicrow.NEWEST_POST_IMG}{topicrow.TOPIC_TYPE}<a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a></span><span class="gensmall"><br />
#
#-----[ REPLACE WITH ]------------------------------------------
#
<td class="row1" width="100%"><span class="topictitle">{topicrow.NEWEST_POST_IMG}{topicrow.TOPIC_TYPE}<a href="{topicrow.U_VIEW_TOPIC}" class="topictitle" title="{topicrow.TOPIC_CONTENT}">{topicrow.TOPIC_TITLE}</a></span><span class="gensmall"><br />
#
#-----[ OPEN ]------------------------------------------
#
search.php
#
#-----[ FIND ]------------------------------------------
#
$sql = "SELECT t.*, f.forum_id, f.forum_name, 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
FROM " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " u2
WHERE t.topic_id IN ($search_results)
AND t.topic_poster = u.user_id
AND f.forum_id = t.forum_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";
#
#-----[ REPLACE WITH ]------------------------------------------
#
$sql = "SELECT pt.post_text, t.*, f.forum_id, f.forum_name, 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
FROM " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " u2, " . POSTS_TEXT_TABLE . " pt
WHERE t.topic_id IN ($search_results)
AND t.topic_poster = u.user_id
AND f.forum_id = t.forum_id
AND pt.post_id = p.post_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";
#
#-----[ FIND ]------------------------------------------
#
$views = $searchset[$i]['topic_views'];
$replies = $searchset[$i]['topic_replies'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
//
// Mouse hover topic preview MOD - BEGIN
//
$topic_content = $searchset[$i]['post_text'];
$bbcode_uid = $searchset[$i]['bbcode_uid'];
$topic_content = bbencode_strip($topic_content, $bbcode_uid);
if (strlen($topic_content) > 200)
{
$topic_content = substr($topic_content, 0, 200) . "...";
}
else
{
$topic_content = $topic_content;
}
//
// Mouse hover topic preview MOD - END
//
#
#-----[ FIND ]------------------------------------------
#
'TOPIC_TITLE' => $topic_title,
#
#-----[ AFTER, ADD ]------------------------------------------
#
'TOPIC_CONTENT' => $topic_content,
#
#-----[ OPEN ]------------------------------------------
#
templates/SubSilver/search_results_topics.tpl
#
#-----[ FIND ]------------------------------------------
#
<td class="row2"><span class="topictitle">{searchresults.NEWEST_POST_IMG}{searchresults.TOPIC_TYPE}<a href="{searchresults.U_VIEW_TOPIC}" class="topictitle">{searchresults.TOPIC_TITLE}</a></span><br /><span class="gensmall">{searchresults.GOTO_PAGE}</span></td>
#
#-----[ REPLACE WITH ]------------------------------------------
#
<td class="row2"><span class="topictitle">{searchresults.NEWEST_POST_IMG}{searchresults.TOPIC_TYPE}<a href="{searchresults.U_VIEW_TOPIC}" class="topictitle" title="{searchresults.TOPIC_CONTENT}">{searchresults.TOPIC_TITLE}</a></span><br /><span class="gensmall">{searchresults.GOTO_PAGE}</span></td>
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoMCode: Alles auswählen
#
#-----[ OPEN ]------------------------------------------
#
include/bbcode.php
#
#-----[ FIND ]------------------------------------------
#
?>
#
#-----[ BEFORE, ADD ]------------------------------------------
#
//
// Mouse hover topic preview MOD - BEGIN
//
function bbencode_strip($message, $uid)
{
$message = strip_tags($message);
// url #2
$message = str_replace("[url]","", $message);
$message = str_replace("[/url]", "", $message);
// url /\[url=([a-z0-9\-\.,\?!%\*_\/:;~\\&$@\/=\+]+)\](.*?)\[/url\]/si
$message = preg_replace("/\[url=([a-z0-9\-\.,\?!%\*_\/:;~\\&$@\/=\+]+)\]/si", "", $message);
$message = str_replace("[/url:$uid]", "", $message);
$message = preg_replace("/\[.*?:$uid:?.*?\]/si", '', $message);
$message = preg_replace('/\[url\]|\[\/url\]/si', '', $message);
$message = str_replace('"', "'", $message);
return $message;
}
//
// Mouse hover topic preview MOD - END
//
#
#-----[ OPEN ]------------------------------------------
#
viewforum.php
#
#-----[ FIND ]------------------------------------------
#
include($phpbb_root_path . 'common.'.$phpEx);
#
#-----[ AFTER, ADD ]------------------------------------------
#
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
#
#-----[ FIND ]------------------------------------------
#
//
// 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
FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . USERS_TABLE . " u2
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 . "
#
#-----[ REPLACE WITH ]------------------------------------------
#
//
// 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.post_text, pt.bbcode_uid
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.post_id = pt.post_id
AND p.poster_id = u2.user_id
AND t.topic_type = " . POST_ANNOUNCE . "
#
#-----[ FIND ]------------------------------------------
#
//
// 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
FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " u2
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 . "
#
#-----[ REPLACE WITH ]------------------------------------------
#
//
// 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.post_text, pt.bbcode_uid
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 p2.post_id = pt.post_id
AND u2.user_id = p2.poster_id
AND t.topic_type <> " . POST_ANNOUNCE . "
#
#-----[ FIND ]------------------------------------------
#
$topic_title = ( count($orig_word) ) ? preg_replace($orig_word, $replacement_word, $topic_rowset[$i]['topic_title']) : $topic_rowset[$i]['topic_title'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
//
// Mouse hover topic preview MOD - BEGIN
//
$topic_content = $topic_rowset[$i]['post_text'];
$bbcode_uid = $topic_rowset[$i]['bbcode_uid'];
$topic_content = bbencode_strip($topic_content, $bbcode_uid);
if (strlen($topic_content) < 1 )
{
$topic_content = "kein Text";
}
else
{
$topic_content = "";
}
//
// Mouse hover topic preview MOD - END
//
#
#-----[ FIND ]------------------------------------------
#
'TOPIC_TITLE' => $topic_title,
#
#-----[ AFTER, ADD ]------------------------------------------
#
'TOPIC_CONTENT' => $topic_content,
#
#-----[ OPEN ]------------------------------------------
#
templates/SubSilver/viewforum_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<td class="row1" width="100%"><span class="topictitle">{topicrow.NEWEST_POST_IMG}{topicrow.TOPIC_TYPE}<a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a></span><span class="gensmall"><br />
#
#-----[ REPLACE WITH ]------------------------------------------
#
<td class="row1" width="100%"><span class="topictitle">{topicrow.NEWEST_POST_IMG}{topicrow.TOPIC_TYPE}<a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>{topicrow.TOPIC_CONTENT}</span><span class="gensmall"><br />
#
#-----[ OPEN ]------------------------------------------
#
search.php
#
#-----[ FIND ]------------------------------------------
#
$sql = "SELECT t.*, f.forum_id, f.forum_name, 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
FROM " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " u2
WHERE t.topic_id IN ($search_results)
AND t.topic_poster = u.user_id
AND f.forum_id = t.forum_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";
#
#-----[ REPLACE WITH ]------------------------------------------
#
$sql = "SELECT pt.post_text, t.*, f.forum_id, f.forum_name, 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
FROM " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " u2, " . POSTS_TEXT_TABLE . " pt
WHERE t.topic_id IN ($search_results)
AND t.topic_poster = u.user_id
AND f.forum_id = t.forum_id
AND pt.post_id = p.post_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";
#
#-----[ FIND ]------------------------------------------
#
$views = $searchset[$i]['topic_views'];
$replies = $searchset[$i]['topic_replies'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
//
// Mouse hover topic preview MOD - BEGIN
//
$topic_content = $searchset[$i]['post_text'];
$bbcode_uid = $searchset[$i]['bbcode_uid'];
$topic_content = bbencode_strip($topic_content, $bbcode_uid);
if (strlen($topic_content) < 1 )
{
$topic_content = "kein Text";
}
else
{
$topic_content = "";
}
//
// Mouse hover topic preview MOD - END
//
#
#-----[ FIND ]------------------------------------------
#
'TOPIC_TITLE' => $topic_title,
#
#-----[ AFTER, ADD ]------------------------------------------
#
'TOPIC_CONTENT' => $topic_content,
#
#-----[ OPEN ]------------------------------------------
#
templates/SubSilver/search_results_topics.tpl
#
#-----[ FIND ]------------------------------------------
#
<td class="row2"><span class="topictitle">{searchresults.NEWEST_POST_IMG}{searchresults.TOPIC_TYPE}<a href="{searchresults.U_VIEW_TOPIC}" class="topictitle">{searchresults.TOPIC_TITLE}</a></span><br /><span class="gensmall">{searchresults.GOTO_PAGE}</span></td>
#
#-----[ REPLACE WITH ]------------------------------------------
#
<td class="row2"><span class="topictitle">{searchresults.NEWEST_POST_IMG}{searchresults.TOPIC_TYPE}<a href="{searchresults.U_VIEW_TOPIC}" class="topictitle">{searchresults.TOPIC_TITLE}</a>{searchresults.TOPIC_CONTENT}</span><br /><span class="gensmall">{searchresults.GOTO_PAGE}</span></td>
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
Code: Alles auswählen
function bbencode_strip($message, $uid)
{
$message = strip_tags($message);
// url #2
$message = str_replace("[url]","", $message);
$message = str_replace("[/url]", "", $message);
// url /\[url=([a-z0-9\-\.,\?!%\*_\/:;~\\&$@\/=\+]+)\](.*?)\[/url\]/si
$message = preg_replace("/\[url=([a-z0-9\-\.,\?!%\*_\/:;~\\&$@\/=\+]+)\]/si", "", $message);
$message = str_replace("[/url:$uid]", "", $message);
$message = preg_replace("/\[.*?:$uid:?.*?\]/si", '', $message);
$message = preg_replace('/\[url\]|\[\/url\]/si', '', $message);
$message = str_replace('"', "'", $message);
return $message;
}
//
// Mouse hover topic preview MOD - END
// Code: Alles auswählen
$topic_content = bbencode_strip($topic_content, $bbcode_uid);
Code: Alles auswählen
#
#-----[ OPEN ]------------------------------------------
#
viewforum.php
#
#-----[ FIND ]------------------------------------------
#
include($phpbb_root_path . 'common.'.$phpEx);
#
#-----[ AFTER, ADD ]------------------------------------------
#
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
#
#-----[ FIND ]------------------------------------------
#
//
// 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
FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . USERS_TABLE . " u2
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 . "
#
#-----[ REPLACE WITH ]------------------------------------------
#
//
// 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.post_text, pt.bbcode_uid
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.post_id = pt.post_id
AND p.poster_id = u2.user_id
AND t.topic_type = " . POST_ANNOUNCE . "
#
#-----[ FIND ]------------------------------------------
#
//
// 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
FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " u2
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 . "
#
#-----[ REPLACE WITH ]------------------------------------------
#
//
// 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.post_text, pt.bbcode_uid
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 p2.post_id = pt.post_id
AND u2.user_id = p2.poster_id
AND t.topic_type <> " . POST_ANNOUNCE . "
#
#-----[ FIND ]------------------------------------------
#
$topic_title = ( count($orig_word) ) ? preg_replace($orig_word, $replacement_word, $topic_rowset[$i]['topic_title']) : $topic_rowset[$i]['topic_title'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
//
// Mouse hover topic preview MOD - BEGIN
//
$topic_content = $topic_rowset[$i]['post_text'];
$bbcode_uid = $topic_rowset[$i]['bbcode_uid'];
if (strlen($topic_content) < 1 )
{
$topic_content = "kein Text";
}
else
{
$topic_content = "";
}
//
// Mouse hover topic preview MOD - END
//
#
#-----[ FIND ]------------------------------------------
#
'TOPIC_TITLE' => $topic_title,
#
#-----[ AFTER, ADD ]------------------------------------------
#
'TOPIC_CONTENT' => $topic_content,
#
#-----[ OPEN ]------------------------------------------
#
templates/SubSilver/viewforum_body.tpl
#
#-----[ OPEN ]------------------------------------------
#
search.php
#
#-----[ FIND ]------------------------------------------
#
$sql = "SELECT t.*, f.forum_id, f.forum_name, 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
FROM " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " u2
WHERE t.topic_id IN ($search_results)
AND t.topic_poster = u.user_id
AND f.forum_id = t.forum_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";
#
#-----[ REPLACE WITH ]------------------------------------------
#
$sql = "SELECT pt.post_text, t.*, f.forum_id, f.forum_name, 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
FROM " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " u2, " . POSTS_TEXT_TABLE . " pt
WHERE t.topic_id IN ($search_results)
AND t.topic_poster = u.user_id
AND f.forum_id = t.forum_id
AND pt.post_id = p.post_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";
#
#-----[ FIND ]------------------------------------------
#
$views = $searchset[$i]['topic_views'];
$replies = $searchset[$i]['topic_replies'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
//
// Mouse hover topic preview MOD - BEGIN
//
$topic_content = $searchset[$i]['post_text'];
$bbcode_uid = $searchset[$i]['bbcode_uid'];
if (strlen($topic_content) < 1 )
{
$topic_content = "kein Text";
}
else
{
$topic_content = "";
}
//
// Mouse hover topic preview MOD - END
//
#
#-----[ FIND ]------------------------------------------
#
'TOPIC_TITLE' => $topic_title,
#
#-----[ AFTER, ADD ]------------------------------------------
#
'TOPIC_CONTENT' => $topic_content,
Code: Alles auswählen
$bbcode_uid = $topic_rowset[$i]['bbcode_uid']; Code: Alles auswählen
#
#-----[ OPEN ]------------------------------------------
#
viewforum.php
#
#-----[ FIND ]------------------------------------------
#
//
// 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
FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . USERS_TABLE . " u2
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 . "
#
#-----[ REPLACE WITH ]------------------------------------------
#
//
// 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.post_text, pt.bbcode_uid
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.post_id = pt.post_id
AND p.poster_id = u2.user_id
AND t.topic_type = " . POST_ANNOUNCE . "
#
#-----[ FIND ]------------------------------------------
#
//
// 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
FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " u2
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 . "
#
#-----[ REPLACE WITH ]------------------------------------------
#
//
// 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.post_text, pt.bbcode_uid
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 p2.post_id = pt.post_id
AND u2.user_id = p2.poster_id
AND t.topic_type <> " . POST_ANNOUNCE . "
#
#-----[ FIND ]------------------------------------------
#
$topic_title = ( count($orig_word) ) ? preg_replace($orig_word, $replacement_word, $topic_rowset[$i]['topic_title']) : $topic_rowset[$i]['topic_title'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
//
// Text vorhanden ???
//
$topic_content = $topic_rowset[$i]['post_text'];
if (strlen($topic_content) < 1 )
{
$topic_content = "kein Text";
}
else
{
$topic_content = "";
}
//
// Ende Mod Text vorhanden
//
#
#-----[ FIND ]------------------------------------------
#
'TOPIC_TITLE' => $topic_title,
#
#-----[ AFTER, ADD ]------------------------------------------
#
'TOPIC_CONTENT' => $topic_content,
#
#-----[ OPEN ]------------------------------------------
#
templates/SubSilver/viewforum_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<td class="row1" width="100%"><span class="topictitle">{topicrow.NEWEST_POST_IMG}{topicrow.TOPIC_TYPE}<a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a></span><span class="gensmall"><br />
#
#-----[ REPLACE WITH ]------------------------------------------
#
<td class="row1" width="100%"><span class="topictitle">{topicrow.NEWEST_POST_IMG}{topicrow.TOPIC_TYPE}<a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>{topicrow.TOPIC_CONTENT}</span><span class="gensmall"><br />
#
#-----[ OPEN ]------------------------------------------
#
search.php
#
#-----[ FIND ]------------------------------------------
#
$sql = "SELECT t.*, f.forum_id, f.forum_name, 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
FROM " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " u2
WHERE t.topic_id IN ($search_results)
AND t.topic_poster = u.user_id
AND f.forum_id = t.forum_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";
#
#-----[ REPLACE WITH ]------------------------------------------
#
$sql = "SELECT pt.post_text, t.*, f.forum_id, f.forum_name, 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
FROM " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " u2, " . POSTS_TEXT_TABLE . " pt
WHERE t.topic_id IN ($search_results)
AND t.topic_poster = u.user_id
AND f.forum_id = t.forum_id
AND pt.post_id = p.post_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";
#
#-----[ FIND ]------------------------------------------
#
$views = $searchset[$i]['topic_views'];
$replies = $searchset[$i]['topic_replies'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
//
// Text vorhanden?
//
$topic_content = $searchset[$i]['post_text'];
if (strlen($topic_content) < 1 )
{
$topic_content = "kein Text";
}
else
{
$topic_content = "";
}
//
// Ende Mod Text vorhanden
//
#
#-----[ FIND ]------------------------------------------
#
'TOPIC_TITLE' => $topic_title,
#
#-----[ AFTER, ADD ]------------------------------------------
#
'TOPIC_CONTENT' => $topic_content,
#
#-----[ OPEN ]------------------------------------------
#
templates/SubSilver/search_results_topics.tpl
#
#-----[ FIND ]------------------------------------------
#
<td class="row2"><span class="topictitle">{searchresults.NEWEST_POST_IMG}{searchresults.TOPIC_TYPE}<a href="{searchresults.U_VIEW_TOPIC}" class="topictitle">{searchresults.TOPIC_TITLE}</a></span><br /><span class="gensmall">{searchresults.GOTO_PAGE}</span></td>
#
#-----[ REPLACE WITH ]------------------------------------------
#
<td class="row2"><span class="topictitle">{searchresults.NEWEST_POST_IMG}{searchresults.TOPIC_TYPE}<a href="{searchresults.U_VIEW_TOPIC}" class="topictitle">{searchresults.TOPIC_TITLE}</a>{searchresults.TOPIC_CONTENT}</span><br /><span class="gensmall">{searchresults.GOTO_PAGE}</span></td>
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#