[RC1] First & Last Post preview on mouse over

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
User avatar
ShadowKnyght
Registered User
Posts: 73
Joined: Mon Aug 30, 2004 1:20 am
Contact:

[RC1] First & Last Post preview on mouse over

Post by ShadowKnyght » Fri Sep 07, 2007 4:45 am

MOD Title: First And Last Post preview on Mouse over Topic title
MOD Description: When you place your mouse over the topic title on your viewforum page you will see the first and last post in that thread.
MOD Version: [RC1] 1.2.0 (This is greater than 1.0.0 as it is an adaptation of Emrag's topicpreview2 hack)

MOD Download: first&last_post.zip

Demo Board: Click Here!

Screen capture: Click for larger version
Image

Installation Time: Less than 5 minutes if installed as is.

Long Description: When you place your mouse over the topic title on your viewforum page you will see 250 characters of the first post and 250 characters of the last post in that thread. This is configurable to any length you like (I just found that 250 is more than enough).

Smilies and BBCODEs (if board has them enabled) will also appear in the pop up preview.

.................Image

Number of characters - size and colour schemes are all customizable. They are hard coded though as I do not have experience with writing mods for ACP interaction... i.e. veriables that you can set via the control panel - it is probably simple enough to do - I just have never tried...

Variables you may want to play with:
Font colour
Background colour
Table size for the pop up
Whether or not the table has borders
Number of characters displayed
You could if you preferred - disable the BBcode and Smilies in the pop up if you wanted to.

This mod will work on all versions of phpBB up to 2.0.22

I do not have phpBB3 installed anywhere so can not port this.

Note: The Only minor bug with this mod (well not a bug but side effect) is that if you have BBcode right at the end of the set character limit it will not be translated into the correct function of that BBcode i.e. image tags will appear as [IMG:9668F223844] or similar part there of... if right on the edge. Otherwise they translate fine and all you will see is the image popping up in the box.

So if anyone knows how to analyse the characters of the post text and strip backwards if there is found to be an open '[' in existence then please let me know...

This does not harm the mods usefulness though as you rarely get BBCODE right on the border of your character limit. And even if you do - the usefulness of this feature far outweighs the occasional strange collection of characters that appears when the above occurs.
Last edited by ShadowKnyght on Sat Sep 08, 2007 2:20 am, edited 1 time in total.
Image

diabolic.bg
Registered User
Posts: 447
Joined: Mon Dec 11, 2006 3:41 pm
Location: Bulgaria, Sofia
Contact:

Re: [RC1] First & Last Post preview on mouse over

Post by diabolic.bg » Fri Sep 07, 2007 10:39 am

Excellent mod! It is working very fine for me in my board http://wasteland-bg.com/
I only corrected backgroung color because all my templates are black and all is very good.
Thanks, ShadowKnyght :!: :D

-= EDIT =-
The mod shows images too. :D
Last edited by diabolic.bg on Sat Feb 23, 2008 4:41 pm, edited 1 time in total.

User avatar
ShadowKnyght
Registered User
Posts: 73
Joined: Mon Aug 30, 2004 1:20 am
Contact:

Re: [RC1] First & Last Post preview on mouse over

Post by ShadowKnyght » Sat Sep 08, 2007 2:09 am

Thanks - I have been playing with this a little further - not the code just the appearance.

Once done I will offer 3 versions the first being the simplest in style and smallest in lines of code, then the 2nd and 3rd just offering some suggestions on potential style changes. This will not effect the install time as this mod is a matter of 3 simple cut and pastes of entire blocks of code.

It does mean however that the Demo board may differ from the first style offered depending on the final style I decide I prefer to keep on my board.

To get around this I will offer a screen shot of each version as well as the demo board of the final choice. This just means I will have to reinstall the first version to generate the screen capture! :(

Style 2 download here: click to download

Screen shot : Image
Image

diabolic.bg
Registered User
Posts: 447
Joined: Mon Dec 11, 2006 3:41 pm
Location: Bulgaria, Sofia
Contact:

Re: [RC1] First & Last Post preview on mouse over

Post by diabolic.bg » Sat Sep 08, 2007 4:56 am

Give me update text and I will test it or give me any directions - what I must replace or must replace the full code? :D

User avatar
ShadowKnyght
Registered User
Posts: 73
Joined: Mon Aug 30, 2004 1:20 am
Contact:

Re: [RC1] First & Last Post preview on mouse over

Post by ShadowKnyght » Sat Sep 08, 2007 6:30 am

you can download the update above - just replace the code you added the first time around.

Finale version - for my site anyway :)

Download all three styles in one zip: click here!


Dark version:
Image

Light version:
Image
Last edited by ShadowKnyght on Tue Sep 11, 2007 4:28 am, edited 2 times in total.
Image

diabolic.bg
Registered User
Posts: 447
Joined: Mon Dec 11, 2006 3:41 pm
Location: Bulgaria, Sofia
Contact:

Re: [RC1] First & Last Post preview on mouse over

Post by diabolic.bg » Sat Sep 08, 2007 6:53 am

I already is tested it. It looks very good!
But for my board I prefer the first style - it keep a board style better. :D I don't need from blue bar or another...

User avatar
beggers
Registered User
Posts: 1257
Joined: Fri Nov 23, 2001 8:19 pm
Location: Las Vegas
Contact:

Re: [RC1] First & Last Post preview on mouse over

Post by beggers » Sat Sep 08, 2007 7:39 am

This looks interesting! It's a lot of code, though. I'm wondering if you think this would noticeably slow down a large board. When does it read the topics (on the initial loading of the forum or when a person hovers on the topic title)? Thanks!

diabolic.bg
Registered User
Posts: 447
Joined: Mon Dec 11, 2006 3:41 pm
Location: Bulgaria, Sofia
Contact:

Re: [RC1] First & Last Post preview on mouse over

Post by diabolic.bg » Sat Sep 08, 2007 7:56 am

beggers wrote: It's a lot of code, though. I'm wondering if you think this would noticeably slow down a large board. When does it read the topics (on the initial loading of the forum or when a person hovers on the topic title)?
I don't think so. But if you see my board, I think you will understand me. My board is virtual fallout vault. It is like military apparatus from fiftieth years 20 century with monochrome computer screen and the blue bar isn't look good.
Last edited by diabolic.bg on Sat Sep 08, 2007 8:31 am, edited 1 time in total.

User avatar
beggers
Registered User
Posts: 1257
Joined: Fri Nov 23, 2001 8:19 pm
Location: Las Vegas
Contact:

Re: [RC1] First & Last Post preview on mouse over

Post by beggers » Sat Sep 08, 2007 8:30 am

diabolic.bg wrote:
beggers wrote: It's a lot of code, though. I'm wondering if you think this would noticeably slow down a large board. When does it read the topics (on the initial loading of the forum or when a person hovers on the topic title)?
I don't think so. But if you see my board, I think you will understand me. My board is virtual fallout vault. It is like military apparatus from fiftieth years 20 century with monochrome computer screen and this blue bar isn't look good.
I like your board but it seems like everything I click on forces me into a "Opera 9.23 for Windows" ad. :(

diabolic.bg
Registered User
Posts: 447
Joined: Mon Dec 11, 2006 3:41 pm
Location: Bulgaria, Sofia
Contact:

Re: [RC1] First & Last Post preview on mouse over

Post by diabolic.bg » Sat Sep 08, 2007 8:34 am

I have problems with MSIE and therefore I redirect it. You can see all with Opera and Firefox. ;) And see VAULT TEC Inc. DETECTOR. :D The flashing text is "If you use MSIE, you will have problems with the site!" Sorry this is only on Bulgarian. :oops:

-= EDIT=-
Already I correct this error.

User avatar
ShadowKnyght
Registered User
Posts: 73
Joined: Mon Aug 30, 2004 1:20 am
Contact:

Re: [RC1] First & Last Post preview on mouse over

Post by ShadowKnyght » Sun Sep 09, 2007 1:40 am

beggers wrote:This looks interesting! It's a lot of code, though. I'm wondering if you think this would noticeably slow down a large board. When does it read the topics (on the initial loading of the forum or when a person hovers on the topic title)? Thanks!
If you do not want to parse the smilies and the BBcode then it shrinks this code down to hardly anything.

Leaving most of the code down to just styling and the java script to pop the text up.

Emrag wrote the initial code that accesses the sql data base - I have just updated and improved it - adding also the last post preview as well.

This is not very intrusive so you could spen 5 minutes to add the code - then if you decide it slows your board down - then remove it - no sql changes are made by this mod - just 4 cut and pastes.

As to you comment diabolic - if you do not like the blue bar - you can change the colour to anything you want.

Just search for <TD bgcolor=#3278B0 width=100% valign=middle height=20> and replace it with another colour.

BTW I must say though that my first version appeared to suit your site perfectly.

Other veriables:
$chr_limit = - first post character limit
$char_limit = - Last post character limit

<FONT style="font-size:12px" color=#FFFFFF> - sets the colour and size of the title text

<table width="100%" bgcolor="#FFFFEE" cellspacing="0" cellpadding="0" border=0> - sets the colour of the post back ground
Image

diabolic.bg
Registered User
Posts: 447
Joined: Mon Dec 11, 2006 3:41 pm
Location: Bulgaria, Sofia
Contact:

Re: [RC1] First & Last Post preview on mouse over

Post by diabolic.bg » Sun Sep 09, 2007 5:43 pm

After some corrections I have installed style 2 too. :D It better fix "title" position.
Thanks again ShadowKnyght :!:

User avatar
ShadowKnyght
Registered User
Posts: 73
Joined: Mon Aug 30, 2004 1:20 am
Contact:

Re: [RC1] First & Last Post preview on mouse over

Post by ShadowKnyght » Mon Sep 10, 2007 2:33 am

I can't see any difference on your site from last time I checked...

BTW - what was wrong with the title position?
Image

diabolic.bg
Registered User
Posts: 447
Joined: Mon Dec 11, 2006 3:41 pm
Location: Bulgaria, Sofia
Contact:

Re: [RC1] First & Last Post preview on mouse over

Post by diabolic.bg » Mon Sep 10, 2007 4:38 am

ShadowKnyght wrote:I can't see any difference on your site from last time I checked...

BTW - what was wrong with the title position?
Yes, I reduce blue bar to black and correct font collor to #33FF33. I love it - like old computer... ;)
In the first style sometimes title Last post move in center. I don't see reason but it is fact. Maybe if the last post begin with quote... :?

Code: Select all

First post:
xxxxxxxxxxxxxxxxxx xxxxxxxx

                    Last post:
xxxxxxxxxx xxxxxxxxxxx x xxxxxx
Last edited by diabolic.bg on Mon Sep 10, 2007 4:47 am, edited 1 time in total.

User avatar
ShadowKnyght
Registered User
Posts: 73
Joined: Mon Aug 30, 2004 1:20 am
Contact:

Re: [RC1] First & Last Post preview on mouse over

Post by ShadowKnyght » Mon Sep 10, 2007 4:46 am

Yes - this can happen when an opening BBcode is within the set number of characters but the closing bbcode is not...

my last version stops this a little bit (only due to the extra styling tables) - but not 100% - how did you work around this? (you mentioned you fixed it?)

What it looks like now when you have an open BBcode "quote"

Image

How it should look (when this bug does not occur):
Image
Image

Post Reply

Return to “[2.0.x] MODs in Development”

Who is online

Users browsing this forum: No registered users and 11 guests