PHP Web Host - Quality Web Hosting For All PHP Applications Just Great Software
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
NoFantasy
Worker
Worker


Joined: Apr 26, 2005
Posts: 114

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

I have seen this mod at several BBtoNuke-forums, but can't find the code anywhere, except the unported one at
Only registered users can see links on this board!
Get registered or login to the forums!


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


Joined: Apr 26, 2005
Posts: 114

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

First post preview (like a tooltip)
Get
Only registered users can see links on this board!
Get registered or login to the forums!
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();"
View user's profile Send private message
NoFantasy
Worker
Worker


Joined: Apr 26, 2005
Posts: 114

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

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.
View user's profile Send private message
Hi-Jack
New Member
New Member


Joined: Jan 09, 2004
Posts: 7

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

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
Moderator


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

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

Have you tried this one?
Only registered users can see links on this board!
Get registered or login to the forums!


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


Joined: Jan 09, 2004
Posts: 7

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

Actually, the error abive comes from this version...
Somehow i believe it does not load the bbcode or something...
View user's profile Send private message
jakec
Moderator


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

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

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.
View user's profile Send private message
Hi-Jack
New Member
New Member


Joined: Jan 09, 2004
Posts: 7

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

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

Enjoy
View user's profile Send private message
montego
Moderator


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

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

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


Finally someone with good sense!!!!!

Wave
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2008 by Raven
Proud to be listed at Lobo Links Web Directory

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::

:: fisubice Theme Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum