News:

Wondering if this will always be free?  See why free is better.

Main Menu

MessagePreviewOnMouseOver

Started by snork13, February 03, 2006, 12:39:52 AM

Previous topic - Next topic

Kindred

wait...    there is no admin interface for this...   is there?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

TheListener

No admin interface.

:-[

Sorry Kindred I was having a blonde moment last night.

I shoulda said what I did in a different mods topic entirely.

snork13

yes, there is under post settings

Length of the message preview on hover
0 to disable
Mods
Please DO NOT PM me with requests for individual support, but post your questions and concerns in the appropriate section of the forum where other users can benefit from them as well. Thank you.
I have been super busy as of late. Working on updates to all my modifications for 2.0.1

TheListener

OOPs

Are you saying I had another blonde moment or is it my old age catching up again?

Kindred

ah...   you are right, under post settings, there IS a field....   I never even bothered to configure that. lol
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Hoodie

Quote from: Chit-Chat ChatterBox Boss on May 15, 2009, 11:39:18 PM
How do I make it so anywhere in the topic title box I put the cursor it makes it show up?
Right now you have to directly put it on the topic title. Kinda going for the idea like boardhover mod does to make it able so you can click anywhere in the box to enter the topic.

Maybe also another tip is that it does this also when you put the cursor on the last post as well not just the subject like it is setup to do.

Was just reading through this thread as I did exactly this..  Was gonna post it for anyone to know but realized that someone requested so I'm glad to help..  Here's how..

On MessageIndex.template.php:

Find:<td class="', $colour_class, '" valign="middle" ', (!empty($topic['quick_mod']['modify']) ? 'id="topic_' . $topic['first_post']['id'] . '" onmouseout="mouse_on_div = 0;" onmouseover="mouse_on_div = 1;" ondblclick="modify_topic(\'' . $topic['id'] . '\', \'' . $topic['first_post']['id'] . '\', \'' . $context['session_id'] . '\');"' : ''), '>

Replace:<td title="', $topic['first_post']['preview'], '" class="', $colour_class, '" valign="middle" ', (!empty($topic['quick_mod']['modify']) ? 'id="topic_' . $topic['first_post']['id'] . '" onmouseout="mouse_on_div = 0;" onmouseover="mouse_on_div = 1;" ondblclick="modify_topic(\'' . $topic['id'] . '\', \'' . $topic['first_post']['id'] . '\', \'' . $context['session_id'] . '\');"' : ''), '>

On Recent.template.php:

Find:<td class="windowbg' , $topic['is_sticky'] && !empty($settings['separate_sticky_lock']) ? '3' : '' , '" width="48%" valign="middle">

Replace:<td title="', $topic['first_post']['preview'], '" class="windowbg' , $topic['is_sticky'] && !empty($settings['separate_sticky_lock']) ? '3' : '' , '" width="48%" valign="middle">

**The other edits to each file still need to be made..  You can change this in the Modifications.xml and then upload it so you don't have to delete the code initially provided..**

Chit-Chat ChatterBox Boss

Quote from: CustomChargersCarClub on August 10, 2009, 06:23:52 PM
Quote from: Chit-Chat ChatterBox Boss on May 15, 2009, 11:39:18 PM
How do I make it so anywhere in the topic title box I put the cursor it makes it show up?
Right now you have to directly put it on the topic title. Kinda going for the idea like boardhover mod does to make it able so you can click anywhere in the box to enter the topic.

Maybe also another tip is that it does this also when you put the cursor on the last post as well not just the subject like it is setup to do.

Was just reading through this thread as I did exactly this..  Was gonna post it for anyone to know but realized that someone requested so I'm glad to help..  Here's how..

On MessageIndex.template.php:

Find:<td class="', $colour_class, '" valign="middle" ', (!empty($topic['quick_mod']['modify']) ? 'id="topic_' . $topic['first_post']['id'] . '" onmouseout="mouse_on_div = 0;" onmouseover="mouse_on_div = 1;" ondblclick="modify_topic(\'' . $topic['id'] . '\', \'' . $topic['first_post']['id'] . '\', \'' . $context['session_id'] . '\');"' : ''), '>

Replace:<td title="', $topic['first_post']['preview'], '" class="', $colour_class, '" valign="middle" ', (!empty($topic['quick_mod']['modify']) ? 'id="topic_' . $topic['first_post']['id'] . '" onmouseout="mouse_on_div = 0;" onmouseover="mouse_on_div = 1;" ondblclick="modify_topic(\'' . $topic['id'] . '\', \'' . $topic['first_post']['id'] . '\', \'' . $context['session_id'] . '\');"' : ''), '>

On Recent.template.php:

Find:<td class="windowbg' , $topic['is_sticky'] && !empty($settings['separate_sticky_lock']) ? '3' : '' , '" width="48%" valign="middle">

Replace:<td title="', $topic['first_post']['preview'], '" class="windowbg' , $topic['is_sticky'] && !empty($settings['separate_sticky_lock']) ? '3' : '' , '" width="48%" valign="middle">

**The other edits to each file still need to be made..  You can change this in the Modifications.xml and then upload it so you don't have to delete the code initially provided..**

Thanks for the update I will add this soon and reply back on how it works  ;)
Chit-Chat ChatterBox

Our site is open to everyone. It is a resource for anyone and everyone to talk about anything and everything you could possibly think of. It's a great place to come and talk, ask questions, or just simply hang out. We offer many great features. All we ask is that you follow by the site rules. Hope to see you around!
www.chitchatchatterbox.com
Remember in the "Referral" box to put "Caleb" while registering.

shakaran

Hi, I made the translations for spanish, spanish_utf8, spanish_es and spanish_es-utf8. I attached the file.

modification_2.xml

<?xml version="1.0"?>

<!DOCTYPE modification SYSTEM "http://www.simplemachines.org/xml/modification">

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

This is an example modification file for SMF packages.



ATTENTION: If you are trying to install this manually, you should try

the package manager.  If it will not work for you, please take a look

at the following for information on this format:

http://mods.simplemachines.org/docs/manual-install.php



================================================================================



Modification files can be used to modify files so that they do what

your package needs them to do to work properly.



- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->



<modification xmlns="http://www.simplemachines.org/xml/modification" xmlns:smf="http://www.simplemachines.org/">

<!-- This information needs to be the same as that in the package-info.xml. -->

<id>snork13:MessagePreviewOnHover</id>

<version>1.7</version>



   

    <file name="$themedir/index.template.php">

<!-- A seach operation, with search rules and code to modify the file with. -->

<operation>

<!-- Search for this text before the code we add.  You can also search for after, and the end of the file. -->

<search position="replace"><![CDATA[$settings['message_index_preview'] = false;]]></search>

<!-- Add this text when we find it.  Note that it's on it's own line on purpose, and the CDATA keeps things clean. -->

<add><![CDATA[$settings['message_index_preview'] = true;]]></add>

</operation>



</file>

   

<!-- Edit a specific file.. -->

<file name="$themedir/MessageIndex.template.php">

<!-- A seach operation, with search rules and code to modify the file with. -->

<operation>

<!-- Search for this text before the code we add.  You can also search for after, and the end of the file. -->

<search position="replace"><![CDATA[echo '

', $topic['is_sticky'] ? '<b>' : '' , '<span id="msg_' . $topic['first_post']['id'] . '">', $topic['first_post']['link'], (!$context['can_approve_posts'] && !$topic['approved'] ? '&nbsp;<em>(' . $txt['awaiting_approval'] . ')</em>' : ''), '</span>', $topic['is_sticky'] ? '</b>' : '';]]></search>

<!-- Add this text when we find it.  Note that it's on it's own line on purpose, and the CDATA keeps things clean. -->

<add><![CDATA[ echo '

', $topic['is_sticky'] ? '<b>' : '' , '<span title="', $topic['first_post']['preview'], '"><span id="msg_' . $topic['first_post']['id'] . '">', $topic['first_post']['link'], (!$context['can_approve_posts'] && !$topic['approved'] ? '&nbsp;<em>(' . $txt['awaiting_approval'] . ')</em>' : ''), '</span></span>', $topic['is_sticky'] ? '</b>' : '';



]]></add>

</operation>



</file>



<file name="$themedir/Recent.template.php">

<!-- A seach operation, with search rules and code to modify the file with. -->

<operation>

<!-- Search for this text before the code we add.  You can also search for after, and the end of the file. -->

<search position="replace"><![CDATA[<img src="' . $settings['images_url'] . '/icons/show_sticky.gif" align="right" alt="" style="margin: 0;" />' : '', $topic['first_post']['link'], ' <a href="', $topic['new_href'], '"><img src="', $settings['lang_images_url'], '/new.gif" alt="', $txt['new'], '" /></a> <span class="smalltext">', $topic['pages'], ' ', $txt['in'], ' ', $topic['board']['link'], '</span></td>]]></search>

<!-- Add this text when we find it.  Note that it's on it's own line on purpose, and the CDATA keeps things clean. -->

<add><![CDATA[ <img src="' . $settings['images_url'] . '/icons/show_sticky.gif" align="right" alt="" style="margin: 0;" />' : '', '<span title="', $topic['first_post']['preview'], '">' ,$topic['first_post']['link'], '</span> <a href="', $topic['new_href'], '"><img src="', $settings['lang_images_url'], '/new.gif" alt="', $txt['new'], '" /></a> <span class="smalltext">', $topic['pages'], ' ', $txt['in'], ' ', $topic['board']['link'], '</span></td>]]></add>

</operation>



</file>

       

        <file name="$sourcedir/MessageIndex.php">

<!-- A seach operation, with search rules and code to modify the file with. -->

        <operation>

<!-- Search for this text before the code we add.  You can also search for after, and the end of the file. -->

<search position="replace"><![CDATA[SUBSTRING(ml.body, 1, 385) AS last_body,

SUBSTRING(mf.body, 1, 385) AS first_body, ml.smileys_enabled AS last_smileys,]]></search>

<!-- Add this text when we find it.  Note that it's on it's own line on purpose, and the CDATA keeps things clean. -->

<add><![CDATA[SUBSTRING(ml.body, 1, 385) AS last_body,

SUBSTRING(mf.body, 1, "'. $modSettings['hover_length'] .'") AS first_body, ml.smileys_enabled AS last_smileys,]]></add>

</operation>

       

<operation>

<!-- Search for this text before the code we add.  You can also search for after, and the end of the file. -->

<search position="replace"><![CDATA[if ($smcFunc['strlen']($row['first_body']) > 128)]]></search>

<!-- Add this text when we find it.  Note that it's on it's own line on purpose, and the CDATA keeps things clean. -->

<add><![CDATA[if ($smcFunc['strlen']($row['first_body']) > $modSettings['hover_length'])]]></add>

</operation>



       

       

       



</file>

       

        <file name="$sourcedir/ManagePosts.php">



<operation>

<!-- Search for this text before the code we add.  You can also search for after, and the end of the file. -->

<search position="before"><![CDATA[array('int', 'edit_disable_time', 'subtext' => $txt['edit_disable_time_zero'], 'postinput' => $txt['manageposts_minutes']),]]></search>

<!-- Add this text when we find it.  Note that it's on it's own line on purpose, and the CDATA keeps things clean. -->

<add><![CDATA[array('int', 'hover_length', 'subtext' => $txt['edit_disable_time_zero'], 'postinput' => $txt['hover_characters']),]]></add>

</operation>



</file>

       



        <file name="$themedir/languages/Admin.english.php">

<operation>

<search position="end"><![CDATA[?>]]></search>

<add><![CDATA[

$txt['hover_length'] = 'Length of the message preview on hover';

$txt['hover_characters'] = 'characters';

]]></add>

</operation>

        </file>

       

        <file name="$themedir/languages/Admin.spanish.php" error="skip">

<operation>

<search position="end"><![CDATA[?>]]></search>

<add><![CDATA[

$txt['hover_length'] = 'Longitud del mensaje en la vista previa';

$txt['hover_characters'] = 'caracteres';

]]></add>

</operation>

        </file>

       

        <file name="$themedir/languages/Admin.spanish-utf8.php" error="skip">

<operation>

<search position="end"><![CDATA[?>]]></search>

<add><![CDATA[

$txt['hover_length'] = 'Longitud del mensaje en la vista previa';

$txt['hover_characters'] = 'caracteres';

]]></add>

</operation>

        </file>

       

        <file name="$themedir/languages/Admin.spanish_es.php" error="skip">

<operation>

<search position="end"><![CDATA[?>]]></search>

<add><![CDATA[

$txt['hover_length'] = 'Longitud del mensaje en la vista previa';

$txt['hover_characters'] = 'caracteres';

]]></add>

</operation>

        </file>

       

        <file name="$themedir/languages/Admin.spanish_es-utf8.php" error="skip">

<operation>

<search position="end"><![CDATA[?>]]></search>

<add><![CDATA[

$txt['hover_length'] = 'Longitud del mensaje en la vista previa';

$txt['hover_characters'] = 'caracteres';

]]></add>

</operation>

        </file>

</modification>
My blog: http://www.shakaran.net
Quijost: professional & reliable webhosting (with SMF support) http://www.quijost.com
Tivion: a player for streaming TV and Radio channels http://www.shakaran.net/blog/tivion
Spanish RPG game: http://www.apogeus.es & http://www.apogeus.es/ao

imrich

Any news on when this may be updated to support SMF 2 RC2? Thanks! :)

snork13

Quote from: imrich on November 09, 2009, 03:51:08 PM
Any news on when this may be updated to support SMF 2 RC2? Thanks! :)

when time permits, i have it package, just need to test
Mods
Please DO NOT PM me with requests for individual support, but post your questions and concerns in the appropriate section of the forum where other users can benefit from them as well. Thank you.
I have been super busy as of late. Working on updates to all my modifications for 2.0.1

snork13

Quote from: Slobodan Radosavljevic on November 20, 2009, 12:02:12 PM
How to change code or whatever to get instant preview? To not wait 5 seconds.. when i go over some thread to Instantly preview text.. ??

show instantly for me on your site
Mods
Please DO NOT PM me with requests for individual support, but post your questions and concerns in the appropriate section of the forum where other users can benefit from them as well. Thank you.
I have been super busy as of late. Working on updates to all my modifications for 2.0.1

Reekie_Red

Is it just me, or does the MessagePreviewOnMouseOver not work with 2.0. I've updated to the latest version of this mod, and have set my characters-to-preview to 25 characters. But nothing shows up

bdewong

This works on 2.0 for me but with RC2 it can be kind of confusing. Some themes use Core as the base and some use Curve as the base so this update mod needs to be run on those themes as well as the current one you are using.

Can i make a suggestion to the mod creator?

Changing the lines in addMessagePreview_settings.php from
// adds the column to themessage table
    $smcFunc['db_query']('', "INSERT INTO {$db_prefix}settings
                (`variable`, `value`) VALUES ('hover_length','0')");

to
// adds the column to themessage table
    $smcFunc['db_query']('', "INSERT IGNORE INTO {$db_prefix}settings
                (`variable`, `value`) VALUES ('hover_length','0')");


The first line fails if "hover_length" already exists in the database.

snork13

Quote from: bdewong on November 30, 2009, 05:07:46 PM
This works on 2.0 for me but with RC2 it can be kind of confusing. Some themes use Core as the base and some use Curve as the base so this update mod needs to be run on those themes as well as the current one you are using.

Can i make a suggestion to the mod creator?

Changing the lines in addMessagePreview_settings.php from
// adds the column to themessage table
    $smcFunc['db_query']('', "INSERT INTO {$db_prefix}settings
                (`variable`, `value`) VALUES ('hover_length','0')");

to
// adds the column to themessage table
    $smcFunc['db_query']('', "INSERT IGNORE INTO {$db_prefix}settings
                (`variable`, `value`) VALUES ('hover_length','0')");


The first line fails if "hover_length" already exists in the database.

If you remove the mod correctly via the package manager, it will remove the row from the table. You can also run it from your browser to remove the table. ignoring something that should be removed make a messy database. which is why i don't use the ignore. if i change the variable name(which I have done in passed versions) you would never get the old variable removed

-snork13
Mods
Please DO NOT PM me with requests for individual support, but post your questions and concerns in the appropriate section of the forum where other users can benefit from them as well. Thank you.
I have been super busy as of late. Working on updates to all my modifications for 2.0.1

dkharp

hello,

this is a really great mod! grats!!  I was wondering can you change the background color and or make it curve? Also if there is a pic in the topic how can you get it  to show the pic too.


Thank you very much!

snork13

Quote from: dkharp on December 07, 2009, 03:38:56 AM
hello,

this is a really great mod! grats!!  I was wondering can you change the background color and or make it curve? Also if there is a pic in the topic how can you get it  to show the pic too.


Thank you very much!

the mod does not allow either. i have no plans in the future to add this.
Mods
Please DO NOT PM me with requests for individual support, but post your questions and concerns in the appropriate section of the forum where other users can benefit from them as well. Thank you.
I have been super busy as of late. Working on updates to all my modifications for 2.0.1

dkharp

That's unfortunate.  :( Great mod but does not go well with the new curve them in it's current state. 

Slobodan Radosavljevic


dkharp

I just looked at your forum. Your about hacking sites and stuff.  Nice community. Sry I just had to say it.

snork13

Mods
Please DO NOT PM me with requests for individual support, but post your questions and concerns in the appropriate section of the forum where other users can benefit from them as well. Thank you.
I have been super busy as of late. Working on updates to all my modifications for 2.0.1

Advertisement: