MyBB Hacks

Full Version: Thread Tooltip Preview
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
(04-20-2013 12:57 AM)Destro Wrote: [ -> ]No. I don't ever hover over the last post column because my theme has no last post column Wink2
Then you have nothing to worry about.

(04-20-2013 12:57 AM)Destro Wrote: [ -> ]I mean, how could I modify the code so it can use the first post only. And not need query to get the last post any more.
It never queries for the first/last post, so I'm not sure what you're talking about.
I mean two variables : $thread['postpreview'] and $thread['lastpostpreview'].

The code has a variable $query which get firstpost and lastpost from the database right? After that, cut off its length based on user's options in ACP.

I've just comment the modifying of template has variable $thread['lastpostpreview']. Now it works fine as I want Yes
(04-20-2013 07:06 PM)Destro Wrote: [ -> ]The code has a variable $query which get firstpost and lastpost from the database right? After that, cut off its length based on user's options in ACP.
Oh, you're referring to the cache rebuild?
Why would you want to change that code?
(04-20-2013 09:16 PM)ZiNgA BuRgA Wrote: [ -> ]Oh, you're referring to the cache rebuild?
Why would you want to change that code?

Because I don't want to get the last post for preview.
(04-22-2013 01:51 AM)Destro Wrote: [ -> ]
(04-20-2013 09:16 PM)ZiNgA BuRgA Wrote: [ -> ]Oh, you're referring to the cache rebuild?
Why would you want to change that code?

Because I don't want to get the last post for preview.
To which I've stated you won't get it if it's never displayed.
I don't understand why you wish to edit cache rebuild code.
(04-22-2013 09:25 AM)ZiNgA BuRgA Wrote: [ -> ]To which I've stated you won't get it if it's never displayed.
I don't understand why you wish to edit cache rebuild code.

Because I get it - The last post preview displayed in my mybb!  I'm using custom tooltip, and full div mybb style (Not traditional mybb table).


Nevermind it anymore, I've removed the $thread['lastpostpreview'] from display. So it will be never displayed.

But now I have new question. How should I do to display the tooltip preview for unicode ?

For example :

Here is my post

Quote:Trước bar Barocco, nhiều vụ cháy lớn tại Sài Gòn đều do sự bất cẩn của thợ hàn. Trong đó, xỉ hàn gây ra thảm họa cháy Trung tâm thương mại quốc tế ITC vẫn còn ám ảnh người dân dù đã xảy ra từ hơn chục năm trước.

But when I hover on thread it only display

Quote:Trước bar Barocco, nhiều

Althought, I set the length is 200.

I think, this issue came from unicode character. How could we make it display correctly ?
If you're using UTF-8 encoding, you can replace all instances of

Code:
"\xA0"

with

Code:
utf8_encode("\xA0")

PHP Code:
utf8_encode("\xA0")


It's working like a charm, my friend! Thanks for your help Biggrin

I installed, activated, but I have no previews of the threads. What further actions should I apply to make previews appear? I don't even see the therad icons on which I could hover my mouse, maybe should I enable them anywhere?

In fact I see some tooltips, but I see no preview images in them.
Are you asking for images to appear in tooltips?
If so, images won't appear - browser tooltips only allow unformatted text to be displayed.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Reference URL's