News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

MessagePreviewOnMouseOver

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

Previous topic - Next topic

choloman05

 Any news on felixibility of character # to be shown?

choloman05

I have this installed on 1.1RC2, running Dilber MC theme. I have a few mods. Sometimes the message preview works, but most of the time it does not. Can anyone help? I'd like for this to work, it's a good mod. Thanks.

Joshua Dickerson

Open up MessageIndex.php and search for
LEFT(mf.body, 384) AS firstBody

Change 384 to a number.

Then search for
if ($smfFunc['strlen']($row['firstBody']) > 128)
$row['firstBody'] = $smfFunc['substr']($row['firstBody'], 0, 128) . '...';
and change 128 to a number.

Warning: Increasing this number decreases performance for the query. I don't recommend you do so.
Come work with me at Promenade Group



Need help? See the wiki. Want to help SMF? See the wiki!

Did you know you can help develop SMF? See us on Github.

How have you bettered the world today?

choloman05

What does these numbers represent? I'm asking so I can get an idea of what I should change them to. Thanks for your help too.

Joshua Dickerson

384 is the amount of characters that is selected from the database. 128 is the amount of characters that are displayed. You can just increase the 128 and not touch the query which is probably what you should do. Increase it to 384. I think there might also be a browser limit on alt tags. Not sure.
Come work with me at Promenade Group



Need help? See the wiki. Want to help SMF? See the wiki!

Did you know you can help develop SMF? See us on Github.

How have you bettered the world today?

MysticTavern

I was wondering if someone would be so kind as to post the -exact- changes that are made to the code in the MessageIndex.php file, so I could apply the same changes to the same MessageIndex.php file for the theme babylon? I'm asking the same question with a few other mods that work only with the default theme.
http://www.themystictavern.com 

The Mystic Tavern--Dream no small dream...


Tanks

Can this be made to show pictures attached in that post ??

NEMINI

Quote from: MysticTavern on October 04, 2006, 03:59:55 PM
I was wondering if someone would be so kind as to post the -exact- changes that are made to the code in the MessageIndex.php file, so I could apply the same changes to the same MessageIndex.php file for the theme babylon? I'm asking the same question with a few other mods that work only with the default theme.
Check out http://docs.simplemachines.org/index.php?topic=402
signatures are boring.

haktanir2

Quote from: MysticTavern on October 04, 2006, 03:59:55 PM
I was wondering if someone would be so kind as to post the -exact- changes that are made to the code in the MessageIndex.php file, so I could apply the same changes to the same MessageIndex.php file for the theme babylon? I'm asking the same question with a few other mods that work only with the default theme.
Just open the zip file, there should be a main file showing all the changes, search there for MessageIndex.php and it will show you the changes made.

MysticTavern

Thank you both so much. That worked. I've just now run into the problem that the code the mod changes in the default theme isn't present in the babylon theme. So now I'm not sure what I have to add, or replace. Which I'm sure is the main problem most people have when trying to apply mods to any other theme except default.
http://www.themystictavern.com 

The Mystic Tavern--Dream no small dream...

choloman05

#31
Quote from: groundup on October 02, 2006, 07:25:23 PM
Open up MessageIndex.php and search for
LEFT(mf.body, 384) AS firstBody

Change 384 to a number.

Then search for
if ($smfFunc['strlen']($row['firstBody']) > 128)
$row['firstBody'] = $smfFunc['substr']($row['firstBody'], 0, 128) . '...';
and change 128 to a number.

Warning: Increasing this number decreases performance for the query. I don't recommend you do so.

thanks, but I couldn't find any of that code.  ???

colleenbbr

Are the changes you posted for RC2 or RC3?

I am looking for template changes for Dilber MC on RC3..any ideas?

Thanks,
Lisa

unrelenting

Does anyone know what to change in the Classic Theme, any version. I'm using 1.1 RC3.

unrelenting

Quote from: unrelenting on October 31, 2006, 10:12:25 PM
Does anyone know what to change in the Classic Theme, any version. I'm using 1.1 RC3.

Surely someone has found a way to add this to the Classic Theme.  ???

choloman05

I think instructions for applying any mod to a custom theme will work, won't they?
  http://docs.simplemachines.org/index.php?topic=402

unrelenting

Quote from: choloman05 on November 10, 2006, 05:54:22 PM
I think instructions for applying any mod to a custom theme will work, won't they?
  http://docs.simplemachines.org/index.php?topic=402

I know how to add it manually, I just don't know where to add the code in the classic theme. The way it is laid out is completely different than the default. It's not even close to the same or I could do it myself.

snork13

Quote from: unrelenting on November 10, 2006, 07:21:27 PM
Quote from: choloman05 on November 10, 2006, 05:54:22 PM
I think instructions for applying any mod to a custom theme will work, won't they?
  http://docs.simplemachines.org/index.php?topic=402

I know how to add it manually, I just don't know where to add the code in the classic theme. The way it is laid out is completely different than the default. It's not even close to the same or I could do it myself.

I take a look at the classic theme.

-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

unrelenting

Quote from: snork13 on November 11, 2006, 11:36:22 AM
Quote from: unrelenting on November 10, 2006, 07:21:27 PM
Quote from: choloman05 on November 10, 2006, 05:54:22 PM
I think instructions for applying any mod to a custom theme will work, won't they?
  http://docs.simplemachines.org/index.php?topic=402

I know how to add it manually, I just don't know where to add the code in the classic theme. The way it is laid out is completely different than the default. It's not even close to the same or I could do it myself.

I take a look at the classic theme.

-Snork13

Thanks, Snork.

snork13

#39
@unrelenting

give this one a try...

-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: