Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> BBtoNuke Mods
Author Message
NoFantasy
Worker
Worker



Joined: Apr 26, 2005
Posts: 114

PostPosted: Sun Aug 28, 2005 12:50 pm Reply with quote

I have seen this mod at several BBtoNuke-forums, but can't find the code anywhere, except the unported one at http://www.phpbbhacks.com/download/3691

Any idea's where to find this?
 
View user's profile Send private message
NoFantasy







PostPosted: Sun Aug 28, 2005 5:47 pm Reply with quote

First post preview (like a tooltip)
Get Only registered users can see links on this board! Get registered or login! first of all.

OPEN
templates/subSilver/overall_header.tpl
FIND
Code:
</head>

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
Code:
?>

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







PostPosted: Wed Aug 31, 2005 12:06 pm Reply with quote

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
New Member



Joined: Jan 09, 2004
Posts: 7

PostPosted: Sun Aug 17, 2008 4:57 am Reply with quote

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...)

Image
 
View user's profile Send private message
jakec
Site Admin



Joined: Feb 06, 2006
Posts: 3048
Location: United Kingdom

PostPosted: Sun Aug 17, 2008 5:37 am Reply with quote

Have you tried this one? http://www.nukeseo.com/modules.php?name=Downloads&op=getit&lid=9

This should be a bit more up to date.
 
View user's profile Send private message
Hi-Jack







PostPosted: Sun Aug 17, 2008 5:40 am Reply with quote

Actually, the error abive comes from this version...
Somehow i believe it does not load the bbcode or something...
 
jakec







PostPosted: Sun Aug 17, 2008 5:43 am Reply with quote

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







PostPosted: Sun Aug 17, 2008 11:09 am Reply with quote

Thx... Removed the code in the mean time (replaced with the backups as i always do)

Enjoy
 
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Tue Aug 19, 2008 6:25 am Reply with quote

Hi-Jack wrote:
(replaced with the backups as i always do)


Finally someone with good sense!!!!!

Wave

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> BBtoNuke Mods

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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©