[2.0.16] Mouse hover last post

The cleanup is complete. This forum is now read only.

Rating:

Excellent!
20
65%
Very Good
5
16%
Good
4
13%
Fair
0
No votes
Poor
2
6%
 
Total votes: 31

darakhshan
Registered User
Posts: 794
Joined: Fri Apr 30, 2004 7:18 pm

Post by darakhshan » Sun Oct 02, 2005 10:19 am

is it possible to do this only for sticky and announcements?

Kieran McMutrie
Registered User
Posts: 2
Joined: Sun Oct 02, 2005 12:28 pm

Post by Kieran McMutrie » Sun Oct 02, 2005 12:30 pm

Has anyone designed a mouse hover first post mod yet?

I noticed it is available on www.redissue.co.uk but can't find it to download on here.

oxfordred
Registered User
Posts: 24
Joined: Sat Jan 08, 2005 12:44 pm

Post by oxfordred » Sat Oct 08, 2005 11:31 am

Is there anyway to remove the black squares where the spaces/line breaks should be. This only happens in netscape.

Could this be made to work on the "view latest posts" serch page????

Sephiseraph
Registered User
Posts: 73
Joined: Sun Jan 16, 2005 11:19 am

Post by Sephiseraph » Tue Oct 11, 2005 12:34 pm

Kieran McMutrie wrote: Has anyone designed a mouse hover first post mod yet?

I noticed it is available on www.redissue.co.uk but can't find it to download on here.


Use exactly the same mod but replace

Code: Select all

$sql = "SELECT post_text FROM " . POSTS_TEXT_TABLE . " WHERE post_id=" . $topic_rowset[$i]['topic_last_post_id'];
with

Code: Select all

$sql = "SELECT post_text FROM " . POSTS_TEXT_TABLE . " WHERE post_id=" . $topic_rowset[$i]['topic_first_post_id'];

dESiLVer
Registered User
Posts: 50
Joined: Wed May 04, 2005 9:26 pm
Location: Turkey
Contact:

Post by dESiLVer » Tue Oct 11, 2005 8:45 pm


christiansongwriter
Registered User
Posts: 102
Joined: Tue May 24, 2005 2:53 am

Post by christiansongwriter » Thu Oct 13, 2005 2:02 am

Great mod - excellent job! :D

Regards,
James

Bleed
Registered User
Posts: 139
Joined: Fri Jan 21, 2005 12:28 am
Contact:

Post by Bleed » Thu Nov 03, 2005 6:20 pm

copy root/templates/subSilver/preview.js to templates/subSilver/preview.js
copy root/templates/subSilver/preview.css to templates/subSilver/preview.css


^in the lastest version of phpbb there is no templates/root directory...

oldcqr
Registered User
Posts: 18
Joined: Sat Jan 28, 2006 9:25 pm

Post by oldcqr » Wed Feb 15, 2006 3:33 pm

Howdy all...

We're using Hoteditor for our board. I did atnbueno's mod to the mod to strip the bb/html which works great. However, Hoteditor still has it's own tags it's put into the text.

The 2 tags are
#ed_op#
#ed_cl#

...and between those 2 tags are from 0 to N chars, all commands for the editor.

If you hover over a post, you'll see the big mess of those tags. Here is an example: http://www.theetcc.net/main/forums/viewforum.php?f=2

It should be easy to whip up a preg_replace to strip the tags and everything between them. Problem is, I have NEVER EVER been able to wrap my head around that Perl regular expression stuff! :oops:

basically I need a preg_replace (that I will put in between lines 1 and 2 of atnbueno's mod) that when it's done will take something like this:

#ed_op#this needs to go away#ed_cl#this text needs to stay#ed_op#here is more that needs to go#ed_cl##ed_op#yes, sometimes stuff that needs to go can be back to back, but that shouldn't make a difference#ed_cl#. and of course there can be from 1 to n of the start stop blocks and what's between them is variable.#ed_op##ed_cl# including nothing.

And turn it into this:

this text needs to stay. and of course there can be from 1 to n of the start stop blocks and what's between them is variable. including nothing.

Can anyone help me out please?

oldcqr
Registered User
Posts: 18
Joined: Sat Jan 28, 2006 9:25 pm

Post by oldcqr » Wed Feb 15, 2006 10:16 pm

I answered my own question:

I added this between lines 1 and 2 of atnbueno's mod of the mod ->

Code: Select all

$last_post = preg_replace("/#ed_op#.+?#ed_cl#/",'',$last_post); 

PerlAddict
Registered User
Posts: 61
Joined: Thu Sep 29, 2005 7:00 am

Post by PerlAddict » Thu Feb 16, 2006 3:35 pm

dESiLVer wrote: new version of mod http://www.phpbb.com/phpBB/viewtopic.php?t=329380


Any clue where to find the new version, since this topic seems to be gone?

PerlAddict
Registered User
Posts: 61
Joined: Thu Sep 29, 2005 7:00 am

Post by PerlAddict » Thu Feb 16, 2006 3:51 pm

Googled and found a cached version of the post with Advanced Mouse Preview 1.0.2, and the download link still worked: http://www.phpbb.com/phpBB/catdb.php?mo ... id=1792908

Here's a site using the new version:
http://www.kungfu.cc/phpBB2/viewforum.php?f=5

And here's one with the old version:
http://www.theetcc.net/main/forums/viewforum.php?f=2


As a note, I made somes changes to the javascript file for the new version. The tooltip divs weren't showing line breaks like the "title" attribute normally does.

Find this line in the preview.js file:

Code: Select all

	this.tip.innerHTML = text;
And add this right above it on a new line:

Code: Select all

	text = text.replace(/\n/g, "<br />");
That will make the previews much more user friendly.


Then I changed how the div box is displayed - before it had a fixed width, which was a little annoying when you had a short message (the "title" attribute of an <a href> tag automatically shortens the containing box to wrap around the text up to a certain width, at which point it stays a fixed width and the text starts wrapping inside the box). Before doing this, be sure to remove the "width" property from your preview.css file first.

So to simulate that effect using these tooltip divs, find this line in preview.js:

Code: Select all

	this.tip.style.display = "block";
And right after it, add this (where 294 is the max size in pixels you want the tooltip div to be ... that's about what my "title" tags were producing in IE 6 without using this mod):

Code: Select all

	if (this.tip.offsetWidth > 294) 
	this.tip.style.width = "294px";
Also find this line:

Code: Select all

	this.tip.innerHTML = "";
And add this right after it (otherwise once you mouse over a longer message, the tooltips on smaller messages will stay stretched out):

Code: Select all

	this.tip.style.width = null;

The main reason I installed this mod is because I wanted something that looked exactly like the normal "title" tooltip for links, but didn't disappear after a few seconds like the title attribute does.

So if you want to duplicate the look of the normal title tooltip, make your preview.css file look like this:

Code: Select all

div#tooltipDiv {
	padding: 1px 2px 1x 2px;
	border: solid 1px #000000;
	display: none; /*white-space: nowrap;*/
	background: #FFFFE1;
	color: #000000;
	font: normal 11px Tahoma;
	text-align: left;
	position: absolute;
	left: 0;
	top: 0;
	z-index: 1000;
	filter: alpha(opacity=100);
	-moz-opacity: 1.00;
}

rainfly
Registered User
Posts: 9
Joined: Sat Feb 04, 2006 12:38 am

Post by rainfly » Wed Feb 22, 2006 9:45 pm

For this to work with subBlack can I just change the places that say subSilver to subBlack?

shotgun000
Registered User
Posts: 116
Joined: Sun Feb 05, 2006 1:57 am

Post by shotgun000 » Thu Mar 09, 2006 8:35 pm

Excellent mod; no problems at all with manual install on 2.0.19 :D

So far, it's my favorite mod Image

fastboy
Registered User
Posts: 1
Joined: Sat Mar 11, 2006 7:11 pm
Location: Bowmanville, Ontario
Contact:

Search Results

Post by fastboy » Sat Mar 11, 2006 7:29 pm

I also added this mod to the search results page on our site... Here are the instuctions:

Code: Select all

# 
#-----[ OPEN ]----------------------------------- 
# 
search.php

# 
#-----[ FIND ]----------------------------------- 
# 

				$last_post_url = '<a href="' . append_sid("viewtopic.$phpEx?"  . POST_POST_URL . '=' . $searchset[$i]['topic_last_post_id']) . '#' . $searchset[$i]['topic_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" border="0" /></a>';

# 
#-----[ AFTER, ADD ]------------------------------------------- 
#

				// START - Advanced mouse hover preview
				if ($board_config['display_first'] != MSG_DISPLAY_NONE)
				{
				if ($board_config['display_first'] == MSG_DISPLAY_FIRST)
				{
				$display_msg = $searchset[$i]['topic_first_post_id'];
				}
				else
				{
				$display_msg = $searchset[$i]['topic_last_post_id'];
				}
				$sql = "SELECT post_text FROM " . POSTS_TEXT_TABLE . " WHERE post_id=" . $display_msg;

				$result = $db->sql_query($sql);
				$row = $db->sql_fetchrow($result);
				$db->sql_freeresult($result);
				
				$last_post = $row['post_text']; 
				if (strlen($last_post) > $board_config['char_limit'])
				{
				$last_post=substr($last_post, 0, $board_config['char_limit']) . "...";
				} 
				$last_post = preg_replace("/\[.+\]/iU",'',$last_post); 
				}
				// END - Advanced mouse hover preview

# 
#-----[ FIND ]----------------------------------- 
# 

			'LAST_POST_TIME' => $last_post_time,

# 
#-----[ AFTER, ADD ]------------------------------------------- 
# 

			'LAST_POST_RESULT' => $last_post,

# 
#-----[ OPEN ]------------------------------ 
# 
templates/subSilver/search_results_topics.tpl

# 
#-----[ FIND ]----------------------------------- 
# 

<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
  <tr> 
	<td align="left" valign="bottom"><span class="maintitle">{L_SEARCH_MATCHES}</span><br /></td>
  </tr>
</table>

# 
#-----[ BEFORE, ADD ]------------------------------------------- 
# 

<script language="JavaScript" src="templates/subSilver/preview.js"></script>
<link href="templates/subSilver/preview.css" rel="stylesheet" type="text/css" />

# 
#-----[ 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>

# 
# 
#-----[ IN-LINE FIND ]----------------------------------- 
# 

class="topictitle">{searchresults.TOPIC_TITLE}

# 
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------- 
# 

title="{searchresults.LAST_POST_RESULT}" 

# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM 

User avatar
jrolson
Registered User
Posts: 850
Joined: Wed Jan 05, 2005 1:53 am
Location: U.S.

Post by jrolson » Sat Mar 11, 2006 10:53 pm

How did this site,
http://www.kungfu.cc/phpBB2/viewforum.php?f=5
get it to be white and transparent?

Post Reply

Return to “[2.0.x] MOD Database Cleanup”