Author
Message
NoFantasy Worker Joined: Apr 26, 2005 Posts: 114
Posted:
Sun Aug 28, 2005 12:50 pm
I have seen this mod at several BBtoNuke-forums, but can't find the code anywhere, except the unported one at
Any idea's where to find this?
NoFantasy Worker Joined: Apr 26, 2005 Posts: 114
Posted:
Sun Aug 28, 2005 5:47 pm
First post preview (like a tooltip)
Get first of all.
OPEN
templates/subSilver/overall_header.tpl
FIND
BEFORE, ADD
Code: <s-cript type="text/javascript" src="http://www.yourdomain.com/overlib_mini.js"><!-- overLIB (c) Erik Bosrup --></s-cript>
OPEN
includes/bbcode.php
FIND
BEFORE, ADD
Code: //MOD BEGIN
function bbencode_strip($message, $uid) {
$message = strip_tags($message);
$message = str_replace("[url]","", $message);
$message = str_replace("[/url]", "", $message);
$message = str_replace("[img]","", $message);
$message = str_replace("[/img]", "", $message);
$message = str_replace("[/color]","", $message);
$message = preg_replace("/\[url=([a-z0-9\-\.,\?!%\*_\/:;~\\&$@\/=\+]+)\]/si", "", $message);
$message = preg_replace("/\[img=([a-z0-9\-\.,\?!%\*_\/:;~\\&$@\/=\+]+)\]/si", "", $message);
$message = preg_replace("/\[color=([a-z0-9\-\.,\?!%\*_\/:;~\\&$@\/=\+]+)\]/si", "", $message);
$message = preg_replace( "`(http|ftp)+(s)?:(//)((\w|\.|\-|_)+)(/)?(\S+)?`i", "<a href=\"\\0\" target=\"_blank\">\\4</a>", $message);
$message = str_replace("[/url:$uid]", "", $message);
$message = preg_replace("/\[.*?:$uid:?.*?\]/si", '', $message);
$message = preg_replace('/\[url\]|\[\/url\]/si', '', $message);
$message = preg_replace('/\[url=([a-z0-9\-\.,\?!%\*_\/:;~\\&$@\/=\+]+)\][img]/si', '', $message);
$message = str_replace("'", "", $message);
$message = str_replace('"', "”", $message);
$message = preg_replace("/(\r\n|\n|\r)/", "<br>", $message);
return $message;
}
//MOD END
OPEN
viewforum.php
FIND
Code: define('IN_PHPBB', true);
BEFORE, ADD
Code: $phpbb_root_test = '';
FIND
Code: include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
AFTER, ADD
Code: include($phpbb_root_test . 'includes/bbcode.'.$phpEx);
FIND
Code: // 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
Code: // 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 t.topic_first_post_id = pt.post_id
AND p.poster_id = u2.user_id
AND t.topic_type = " . POST_ANNOUNCE . "
FIND
Code: // 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
Code: // 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 p.post_id = pt.post_id
AND u2.user_id = p2.poster_id
AND t.topic_type <> " . POST_ANNOUNCE . "
FIND
Code: $topic_title = ( count($orig_word) ) ? preg_replace($orig_word, $replacement_word, $topic_rowset[$i]['topic_title']) : $topic_rowset[$i]['topic_title'];
AFTER, ADD
Code: // 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;
}
// MOD END
FIND
Code: 'TOPIC_TITLE' => $topic_title,
REPLACE WITH
Code: 'TOPIC_TITLE' => $topic_title = preg_replace("/(\r\n|\n|\r|')/", "", $topic_title),
OPEN
templates/subSilver/viewforum_body.tpl
FIRST LINE
ADD
Code: <div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>
FIND
Code: >{topicrow.TOPIC_TITLE}
IN-LINE BEFORE, ADD
Code: onmouseover="return overlib('{topicrow.TOPIC_CONTENT}', CAPTION, '{topicrow.TOPIC_TITLE}', STATUS, '{topicrow.TOPIC_TITLE}');" onmouseout="return nd();"
NoFantasy Worker Joined: Apr 26, 2005 Posts: 114
Posted:
Wed Aug 31, 2005 12:06 pm
Consider code above as a Work-In-Process-project. I'll try to keep it up-to-date, if it's of any interest for others.
Hi-Jack New Member Joined: Jan 09, 2004 Posts: 7
Posted:
Sun Aug 17, 2008 4:57 am
Think i just used an old version as this states few things different than the original install guide... Anyway, it is working but somehow all i see is code with the text... (I use a different template but all files have been adjusted exactly as stated...)
jakec Moderator Joined: Feb 06, 2006 Posts: 1854 Location: United Kingdom
Posted:
Sun Aug 17, 2008 5:37 am
Have you tried this one?
This should be a bit more up to date.
Hi-Jack New Member Joined: Jan 09, 2004 Posts: 7
Posted:
Sun Aug 17, 2008 5:40 am
Actually, the error abive comes from this version...
Somehow i believe it does not load the bbcode or something...
jakec Moderator Joined: Feb 06, 2006 Posts: 1854 Location: United Kingdom
Posted:
Sun Aug 17, 2008 5:43 am
I see you have posted at NukeSEO as well. I would be inclined to wait for kguske to reply there as it is his mod.
Hi-Jack New Member Joined: Jan 09, 2004 Posts: 7
Posted:
Sun Aug 17, 2008 11:09 am
Thx... Removed the code in the mean time (replaced with the backups as i always do)
Enjoy
montego Moderator Joined: Aug 29, 2004 Posts: 7487 Location: Arizona
Posted:
Tue Aug 19, 2008 6:25 am
Hi-Jack wrote: (replaced with the backups as i always do)
Finally someone with good sense!!!!!
View next topic
View previous topic
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum