Link to the mod (https://custom.simplemachines.org/index.php?mod=1151)
This modification takes a thumbnail attachment attached to the first post of the topic and shows this thumbnail on the topic listing page of a forum.
Version 4.2
!Fixes for image distortion and styling for SMF 2.1.X thanks to
@rjenVersion 4.1
!Hide thumbnail column if users don't have permissions to view attachments
Version 4.0
!Fixed a case where if you are just using linked images the column for thumbnail topic will not appear
Version 3.0.1
!Fixed bug SMF 2.0.x not saving new board thumbnail topic settings
Version 3.0
+Added support for img tags inside the first forum post for SMF 2.0 thanks to br360
Setting to control height width found under Modification Settings. Use zero in both values to disable it.
!Fixed board level permissions to hide thumbnails
Version 2.0
Big thanks to dougiefresh for this update.
+Adds an interface in the manage boards area to checkbox if the board has the thumbnail topic system enabled for it or not.
Version 1.1
!Fixed showing an image if there was another attachment of a different type before it.
!Also fixed issue with posts disappearing.
Great! thanks for the mod! I have an idea, how about making it a board-based mod, so there one can choose where to put it in the ?action=manageboards section.
Great mod!
Dang that is cool. I'm just afraid what picture I'd see. Knowing my members they will start a topic and put a funky picture up just to mess with me >:(
Great modification. Thank you vbgamer45...
Just what I was almost looking for. I think im gonna try it. Just how bad does the server resources take a hit because of all of the queries??
How would one modify this to pick up hot linked images?
This is what im truly looking for ;D
one more thing. Where in the script can i adjust the thumbnail size? They are quite large :)
For that you'll need to go here /index.php?action=manageattachments and change the
Maximum width of thumbnails:
Maximum height of thumbnails:
That should do it.
Quote from: dannbass on April 04, 2008, 07:11:54 PM
For that you'll need to go here /index.php?action=manageattachments and change the
Maximum width of thumbnails:
Maximum height of thumbnails:
That should do it.
Hummm, that didnt work :(
It changed the size of the thumbnails inside the thread but not outside. Is this how you did it (assuming that you have this mod)?
NM, it works now. Just took a bit ;D
Quote from: dannbass on April 04, 2008, 01:47:21 PM
Great! thanks for the mod! I have an idea, how about making it a board-based mod, so there one can choose where to put it in the ?action=manageboards section.
Great mod!
That's planned for the next release.
Quote from: vbgamer45 on April 04, 2008, 10:25:58 PM
That's planned for the next release.
Fabulous! For now I'll get by with conditionals and $context['current_board'] and so on!
Thanks vbgamer45!
I have eror
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LEFT(ml.body, 384) AS lastBody, LEFT(mf.body, 384) AS firstBody, ml.smileysEnabl' at line 11
when write this line modifitacion:
IFNULL(big.ID_ATTACH, 0) AS bigId, big.filename AS bigFilename, big.width AS bigWidth, big.height AS bigHeight,
IFNULL(thn.ID_ATTACH, 0) AS thnId, thn.filename AS thnFilename, thn.width AS thnWidth, thn.height AS thnHeight
I would need to see the whole query to see what is causing that error.
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LEFT(ml.body, 384) AS lastBody, LEFT(mf.body, 384) AS firstBody, ml.smileysEnabl' at line 11
File: /home/phonedat/public_html/upoznavanje/Sources/MessageIndex.php
Line: 459
Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 1.1.4, while your database is at version 1.1.2. The above error might possibly go away if you execute the latest version of upgrade.php.
this si cod , where is problem on messageindex.php:
mf.subject AS firstSubject, mf.icon AS firstIcon, mf.posterName AS firstMemberName,
mf.ID_MEMBER AS firstID_MEMBER, IFNULL(memf.realName, mf.posterName) AS firstDisplayName,IFNULL(big.ID_ATTACH, 0) AS bigId, big.filename AS bigFilename, big.width AS bigWidth, big.height AS bigHeight,
IFNULL(thn.ID_ATTACH, 0) AS thnId, thn.filename AS thnFilename, thn.width AS thnWidth, thn.height AS thnHeight
LEFT(ml.body, 384) AS lastBody, LEFT(mf.body, 384) AS firstBody, ml.smileysEnabled AS lastSmileys,
mf.smileysEnabled AS firstSmileys
Change this part
IFNULL(thn.ID_ATTACH, 0) AS thnId, thn.filename AS thnFilename, thn.width AS thnWidth, thn.height AS thnHeight
LEFT(ml.body, 384) AS lastBody, LEFT(mf.body, 384) AS firstBody, ml.smileysEnabled AS lastSmileys,
mf.smileysEnabled AS firstSmileys
To
IFNULL(thn.ID_ATTACH, 0) AS thnId, thn.filename AS thnFilename, thn.width AS thnWidth, thn.height AS thnHeight,
LEFT(ml.body, 384) AS lastBody, LEFT(mf.body, 384) AS firstBody, ml.smileysEnabled AS lastSmileys,
mf.smileysEnabled AS firstSmileys
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LEFT(ml.body, 384) AS lastBody, LEFT(mf.body, 384) AS firstBody, ml.smileysEnabl' at line 12
File: /home/phonedat/public_html/upoznavanje/Sources/MessageIndex.php
Line: 459
Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 1.1.4, while your database is at version 1.1.2. The above error might possibly go away if you execute the latest version of upgrade.php
part of cod:
mf.subject AS firstSubject, mf.icon AS firstIcon, mf.posterName AS firstMemberName,
mf.ID_MEMBER AS firstID_MEMBER, IFNULL(memf.realName, mf.posterName) AS firstDisplayName,IFNULL(thn.ID_ATTACH, 0) AS thnId, thn.filename AS thnFilename, thn.width AS thnWidth, thn.height AS thnHeight,
LEFT(ml.body, 384) AS lastBody, LEFT(mf.body, 384) AS firstBody, ml.smileysEnabled AS lastSmileys,
mf.smileysEnabled AS firstSmileys
LEFT(ml.body, 384) AS lastBody, LEFT(mf.body, 384) AS firstBody, ml.smileysEnabled AS lastSmileys,
mf.smileysEnabled AS firstSmileys
You have the same code repeated remove one of the
LEFT(ml.body, 384) AS lastBody, LEFT(mf.body, 384) AS firstBody, ml.smileysEnabled AS lastSmileys,
mf.smileysEnabled AS firstSmileys
it is work, you are best
Vbgamer,
Do you know what would cause this glitch? When i uninstall the mod the posts show up, but if i reapply it they disappear. If i do a search for these missing posts they do show up though.
(http://img212.imagevenue.com/loc260/th_29743_untitled_122_260lo.JPG) (http://img212.imagevenue.com/img.php?image=29743_untitled_122_260lo.JPG)
Quote from: madman71 on April 06, 2008, 08:57:06 PM
Vbgamer,
Do you know what would cause this glitch? When i uninstall the mod the posts show up, but if i reapply it they disappear. If i do a search for these missing posts they do show up though.
(http://img212.imagevenue.com/loc260/th_29743_untitled_122_260lo.JPG) (http://img212.imagevenue.com/img.php?image=29743_untitled_122_260lo.JPG)
Not sure yet would need to do some more testing like what is contained in those posts?
vbgamer45,
can is posible, if i post image like link , example /img/http://www.example.com/1.gif/img,
and this image to be thumbnail like atachment?
A jpeg attachement and a zip file.
on another issue/note, I noticed that some of the thumbnails do not appear IF there is both a jpg and a zip file attached in the sampe post.
Quote from: drHaus on April 06, 2008, 09:03:19 PM
vbgamer45,
can is posible, if i post image like link , example /img/http://www.example.com/1.gif/img,
and this image to be thumbnail like atachment?
Not without out a lot of work.
Hi I am also having problems with this mod. I got a test failed with the messageindex.template.php file so i attempted to fix it manually and it seems to be clashing with my sticky mod (we think) I took the sticky code out which fixed the tables but only some images were showing up but in full size not thumb size (i changed the size to 150 x 150).
I also had a problem when i went to view some threads they were missing. But after searching for them i could find them but couldnt see them within the board. I uninstalled the mod and all the threads were visable again.
Quote from: Natz on April 06, 2008, 09:39:59 PM
I also had a problem when i went to view some threads they were missing. But after searching for them i could find them but couldnt see them within the board. I uninstalled the mod and all the threads were visable again.
Yep! that's exactly what i experienced. I did notice one thing that's unrelated to this issue. If you attach a non jpg file first followed by a jpg , the thumbnail will not show up.
It seems that you have to attach a jpg first.
Quote from: madman71 on April 06, 2008, 10:46:28 PM
Quote from: Natz on April 06, 2008, 09:39:59 PM
I also had a problem when i went to view some threads they were missing. But after searching for them i could find them but couldnt see them within the board. I uninstalled the mod and all the threads were visable again.
Yep! that's exactly what i experienced. I did notice one thing that's unrelated to this issue. If you attach a non jpg file first followed by a jpg , the thumbnail will not show up.
It seems that you have to attach a jpg first.
Hmm will take a look at that.
thanks Vb. We appreciate it.
You mod is a big hit on my board :D
Quote from: Natz on April 06, 2008, 09:39:59 PM
I also had a problem when i went to view some threads they were missing. But after searching for them i could find them but couldnt see them within the board. I uninstalled the mod and all the threads were visable again.
This is the exact problem I was having. I hope you can get it sorted out because i really LOVE this mod. Thank you for your hard work on it.
Version 1.1
!Fixed showing an image if there was another attachment of a different type before it.
!Also fixed issue with posts disappearing.
I tried the revised mod and still no go. It's not showing all the posts. Do you think it has something to do with using utf8? Maybe I need to do something more?
Not sure really it makes two small additions to the query but do not see how it would affect it
<file name="$sourcedir/MessageIndex.php">
<operation>
<search position="before"><![CDATA[LEFT(ml.body, 384) AS lastBody, LEFT(mf.body, 384) AS firstBody, ml.smileysEnabled AS lastSmileys,
mf.smileysEnabled AS firstSmileys]]></search>
<add><![CDATA[, IFNULL(big.ID_ATTACH, 0) AS bigId, big.filename AS bigFilename, big.width AS bigWidth, big.height AS bigHeight,
IFNULL(thn.ID_ATTACH, 0) AS thnId, thn.filename AS thnFilename, thn.width AS thnWidth, thn.height AS thnHeight]]></add>
</operation>
<operation>
<search position="before"><![CDATA[FROM ({$db_prefix}topics AS t, {$db_prefix}messages AS ml, {$db_prefix}messages AS mf)]]></search>
<add><![CDATA[
LEFT JOIN {$db_prefix}attachments AS big ON (big.ID_MSG = mf.ID_MSG AND big.attachmentType = 0)
LEFT JOIN {$db_prefix}attachments AS thn ON (thn.ID_ATTACH = big.ID_THUMB)]]></add>
</operation>
I don't know enough about scripts to even say I know anything so, I'm afraid I'm not much help.
When I installed it the first time, there were some random topics missing on the list. For instance, on page 1 of the listing, it showed 6 topics even though it was set to show 15 per page. If I looked at page 2 there were 15 listed that started after the last one that didn't show on page 1. If I clicked the next link, it would show but, just not on the listing.
When I installed the modified version, it only showed one page and one topic listed.
Don't know if that will help any.
amazing! I was looking for a mod like this, but my forum is 2.0 beta 3 :'( :'( :'( :'(
vb im sure you are aware, but yes, some posts are still missing. Im gonna reinstall the mod again this weeked.
thanks again
Vb, I did more tests with uninstalling and reinstalling the updated mod and im still getting the same results. I even tried it on the default theme that comes with SMF.
On one board I had 60 posts with the mod turned off. When i turned back on there was only about 28 showing with the rest showing empty boxes where links should go. I know this doesn't tell you much but it does show over half are missing. :(
------------------------
on a different topic:
I had a user inform me of the hoverlink popup mod that has not been written yet for SMF. it's the one that dispalys thumbnails of external links when you hover on links. I've mentioned it here: http://www.simplemachines.org/community/index.php?topic=227723.0
He got his friend to give us the code. (not sure if it's complete) This code is for the
function make_preview_images($getpostimages,$maximages)
{
preg_match_all('^\[URL=(.+?)\](.+?)\[/URL\]^im', $getpostimages, $url_matches);
preg_match_all('/\[IMG\](.*?)\[\/IMG\]/si', $getpostimages, $img_matches);
if(!$url_matches[1] OR !$img_matches[1]){
preg_match_all('^\[url=(.+?)\](.+?)\[/url\]^im', $getpostimages, $url_matches);
preg_match_all('/\[img\](.*?)\[\/img\]/si', $getpostimages, $img_matches);
}
$getpostimages = "";
for ($i=0; $i< $maximages; $i++) {
if(isset($url_matches[1][$i])){
$getpostimages .= "[URL=". $url_matches[1][$i]."][IMG]". $img_matches[1][$i]."[/IMG][/URL]";
}
}
return $getpostimages;
}
USEAGE: echo make_preview_images($POST_DATA_FROM_DATABASE,10);
for the rest he should find some 'tooltip' javascript...
-----------------------------------
the above code and instructions is what his friend sent us. I do not know much about programming but I thought maybe this might help you if you decide to make that thumbnail mod that displays EXTERNAL links and not attached files.
I know you said that it's a lot of work but maybe the code above will make it easier. I dont know.
cheers!
madman
Hello,
this is a really great mod! I wanted to integrate it, but it doesn't integrate into my MessageIndex.template.php
I have tried to add the code manually but it will keep on producing errors.
Could someone maybe please kindly make the neccessary changes to my MessageIndex.template.php for me?
Any help would be much appreciated. Thank you!
<?php
// Version: 1.1; MessageIndex
function template_main()
{
global $context, $settings, $options, $scripturl, $modSettings, $txt;
//Display Ads on the Message index
if (function_exists("show_threadindexAds"))
{
$ads = show_threadindexAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
}
echo '
<div style="margin-bottom: 2px;"><a name="top"></a>', theme_linktree(), '</div>';
if (isset($context['boards']) && (!empty($options['show_children']) || $context['start'] == 0))
{
echo '
<div class="tborder" style="margin-bottom: 3ex; ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' width: 100%;' : '', '">
<table border="0" width="100%" cellspacing="1" cellpadding="5" class="bordercolor">
<tr>
<td colspan="5" class="catbg">', $txt['parent_boards'], '</td>
</tr>';
foreach ($context['boards'] as $board)
{
echo '
<tr>
<td ' , !empty($board['children']) && !$modSettings['display_childboards'] && !$modSettings['disable_avatar'] ? 'rowspan="2"' : '1' , ' class="windowbg" width="6%" align="center" valign="top"><a href="', $scripturl, '?action=unread;board=', $board['id'], '.0">';
if ($board['new']) {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on.gif'))
$board_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on.gif';
else
$board_new_img=$settings['images_url']. '/on.gif';
echo '<img src="', $board_new_img,'" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
} elseif ($board['children_new']) {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on2.gif'))
$childboard_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on2.gif';
else
$childboard_new_img=$settings['images_url']. '/on2.gif';
echo '<img src="', $childboard_new_img,'" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
} else {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/off.gif'))
$board_nonew_img=$settings['theme_url']. '/icons/' . $board['id'] . '/off.gif';
else
$board_nonew_img=$settings['images_url']. '/off.gif';
echo '<img src="', $board_nonew_img,'" alt="', $txt[334], '" title="', $txt[334], '" border="0" />';
}
echo '</a>
</td>
<td class="windowbg2" valign=top>
',$board['viewer_text'],'<span class="largetext"><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></span><br />
', $board['description'];
// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
if (!empty($board['moderators']))
echo '
<div style="padding-top: 1px;"><small><i>', count($board['moderators']) == 1 ? $txt[298] : $txt[299], ': ', implode(', ', $board['link_moderators']), '</i></small></div>';
// Show some basic information about the number of posts, etc.
echo '
</td>
<td class="windowbg" valign="top" align="center" style="width: 12ex;"><small>
', $board['posts'], '<br>', $txt[21], '<br />
', $board['topics'],'<br>', $txt[330], '</small>
</td>';
if (!$modSettings['disable_avatar'])
echo '
<td width="', $modSettings['board_avatar_width'] ? $modSettings['board_avatar_width'] : '1','" class="windowbg2" align="center">
', $board['last_post']['member']['avatar'], '
</td>';
echo '
<td class="windowbg2" valign="middle" width="22%"><small>';
/* The board's and children's 'last_post's have:
time, timestamp (a number that represents the time.), id (of the post), topic (topic id.),
link, href, subject, start (where they should go for the first unread post.),
and member. (which has id, name, link, href, username in it.) */
if (!empty($board['last_post']['id']))
echo '
<b>', $txt[22], '</b> ', $txt[525], ' ', $board['last_post']['member']['link'] , '<br />
', $txt['smf88'], ' ', $board['last_post']['link'], '<br />
', $txt[30], ' ', $board['last_post']['time'];
echo '</small>
</td>
</tr>';
// Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...)
if (!empty($board['children']) && !$modSettings['display_childboards'])
{
// Sort the links into an array with new boards bold so it can be imploded.
$children = array();
/* Each child in each board's children has:
id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */
foreach ($board['children'] as $child)
{
$child['link'] = '<a href="' . $child['href'] . '" title="' . ($child['new'] ? $txt[333] : $txt[334]) . ' (' . $txt[330] . ': ' . $child['topics'] . ', ' . $txt[21] . ': ' . $child['posts'] . $child['viewer_text'] . ')">' . $child['name'] . '</a>';
$children[] = $child['new'] ? '<b>' . $child['link'] . '</b>' : $child['link'];
}
echo '
<tr>
<td colspan="', !$modSettings['display_childboards'] ? '4' : '1', '" class="windowbg', !empty($settings['seperate_sticky_lock']) ? '3' : '', '">
<small><b>', $txt['parent_boards'], '</b>: ', implode(', ', $children), '</small>
</td>
</tr>';
}
}
echo '
</table>
</div>';
//Display Ads on the Message index
if (function_exists("show_underchildren"))
{
$ads = show_underchildren();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
}
}
if (!empty($options['show_board_desc']) && $context['description'] != '')
{
echo '
<table width="100%" cellpadding="6" cellspacing="1" border="0" class="tborder" style="padding: 0; margin-bottom: 2ex;">
<tr>
<td class="titlebg2" width="100%" height="24" style="border-top: 0;">
<small>', $context['description'], '</small>
</td>
</tr>
</table>';
}
// Create the button set...
$normal_buttons = array(
'new_topic' => array('test' => 'can_post_new', 'text' => 'smf258', 'image' => 'new_topic.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0'),
'post_poll' => array('test' => 'can_post_poll', 'text' => 'smf20', 'image' => 'new_poll.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0;poll'),
'markread' => array('text' => 'mark_read_short', 'image' => 'markread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=board;board=' . $context['current_board'] . '.0;sesc=' . $context['session_id']),
'notify' => array('test' => 'can_mark_notify', 'text' => 125, 'image' => 'notify.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_board'] : $txt['notification_enable_board']) . '\');"', 'url' => $scripturl . '?action=notifyboard;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';board=' . $context['current_board'] . '.' . $context['start'] . ';sesc=' . $context['session_id']),
'post_smfbuy' => array('test' => 'can_post_smfbuy', 'text' => 'new_smfbuy', 'image' => 'auction.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0;smfbuy'),
);
// They can only mark read if they are logged in and it's enabled!
if (!$context['user']['is_logged'] || !$settings['show_mark_read'])
unset($normal_buttons['markread']);
if (!$context['no_topic_listing'])
{
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="middletext">', $txt[139], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . ' <a href="#bot"><b>' . $txt['topbottom5'] . '</b></a>' : '', '</td>
<td align="right" style="padding-right: 1ex;">
<table cellpadding="0" cellspacing="0">
<tr>
', template_button_strip($normal_buttons, 'bottom'), '
</tr>
</table>
</td>
</tr>
</table>';
// If Quick Moderation is enabled start the form.
if (!empty($options['display_quick_mod']) && !empty($context['topics']))
echo '
<form action="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], '" method="post" accept-charset="', $context['character_set'], '" name="quickModForm" id="quickModForm" style="margin: 0;">';
echo '
<div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? 'style="width: 100%;"' : '', '>
<table border="0" width="100%" cellspacing="1" cellpadding="4" class="bordercolor">
<tr>';
// Are there actually any topics to show?
if (!empty($context['topics']))
{
echo '
<td width="9%" colspan="2" class="catbg3"></td>
<td class="catbg3"><b><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=subject', $context['sort_by'] == 'subject' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt[70], $context['sort_by'] == 'subject' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></b></td>
<td class="catbg3" width="11%"><b><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=starter', $context['sort_by'] == 'starter' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt[109], $context['sort_by'] == 'starter' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></b></td>
<td class="catbg3" width="4%" align="center"><b><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=replies', $context['sort_by'] == 'replies' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt[110], $context['sort_by'] == 'replies' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></b></td>
<td class="catbg3" width="4%" align="center"><b><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=views', $context['sort_by'] == 'views' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt[301], $context['sort_by'] == 'views' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></b></td>
<td class="catbg3" width="22%"><b><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=last_post', $context['sort_by'] == 'last_post' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt[111], $context['sort_by'] == 'last_post' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></b></td>';
// Show a "select all" box for quick moderation?
if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1)
echo '
<td class="catbg3" width="24" valign="middle" align="center">
<input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');" class="check" />
</td>';
// If it's on in "image" mode, don't show anything but the column.
elseif (!empty($options['display_quick_mod']))
echo '
<td class="catbg3" width="4%" valign="middle" align="center"></td>';
}
// No topics.... just say, "sorry bub".
else
echo '
<td class="catbg3" width="100%" colspan="7"><b>', $txt[151], '</b></td>';
echo '
</tr>';
if (!empty($settings['display_who_viewing']))
{
echo '
<tr class="windowbg2">
<td colspan="' , !empty($options['display_quick_mod']) ? '8' : '7' , '"><small>';
if ($settings['display_who_viewing'] == 1)
echo count($context['view_members']), ' ', count($context['view_members']) == 1 ? $txt['who_member'] : $txt[19];
else
echo empty($context['view_members_list']) ? '0 ' . $txt[19] : implode(', ', $context['view_members_list']) . ((empty($context['view_num_hidden']) or $context['can_moderate_forum']) ? '' : ' (+ ' . $context['view_num_hidden'] . ' ' . $txt['hidden'] . ')');
echo $txt['who_and'], $context['view_num_guests'], ' ', $context['view_num_guests'] == 1 ? $txt['guest'] : $txt['guests'], $txt['who_viewing_board'], '
</small></td>
</tr>';
}
foreach ($context['topics'] as $topic)
{
// Do we want to seperate the sticky and lock status out?
if (!empty($settings['seperate_sticky_lock']) && strpos($topic['class'], 'sticky') !== false)
$topic['class'] = substr($topic['class'], 0, strrpos($topic['class'], '_sticky'));
if (!empty($settings['seperate_sticky_lock']) && strpos($topic['class'], 'locked') !== false)
$topic['class'] = substr($topic['class'], 0, strrpos($topic['class'], '_locked'));
echo '
<tr>
';
if(isset($topic['is_buddy']) && empty($options['show_buddy_highlight']))
echo '<td bgcolor="',$modSettings['color_buddylist'],'" valign="middle" align="center" width="5%">';
else
echo '<td class="windowbg2" valign="middle" align="center" width="5%">';
echo '
<img src="', $settings['images_url'], '/topic/', $topic['class'], '.gif" alt="" />
</td>
<td class="windowbg2" valign="middle" align="center" width="4%">
<img src="', $topic['first_post']['icon_url'], '" alt="" />
</td>
<td class="windowbg' , !empty($settings['seperate_sticky_lock']) && $topic['is_sticky'] ? '3' : '' , '" valign="top" ', (!empty($topic['quick_mod']['remove']) ? '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'] . '\');"' : ''), '>';
if (!empty($settings['seperate_sticky_lock']))
echo '
' , $topic['is_locked'] ? '<img src="' . $settings['images_url'] . '/icons/quick_lock.gif" align="right" alt="" id="lockicon' . $topic['first_post']['id'] . '" style="margin: 0;" />' : '' , '
' , $topic['is_sticky'] ? '<img src="' . $settings['images_url'] . '/icons/show_sticky.gif" align="right" alt="" id="stickyicon' . $topic['first_post']['id'] . '" style="margin: 0;" />' : '';
echo '
', $topic['is_sticky'] ? '<b>' : '' , '<span title="', $topic['first_post']['preview'], '"><span id="msg_' . $topic['first_post']['id'] . '">', $topic['first_post']['link'], '</span></span>', $topic['is_sticky'] ? '</b>' : '';
// Is this topic new? (assuming they are logged in!)
if ($topic['new'] && $context['user']['is_logged'])
echo '
<a href="', $topic['new_href'], '" id="newicon' . $topic['first_post']['id'] . '"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" /></a>';
$preLength = $modSettings['previewLength'];
$oldPreview = $topic['first_post']['preview'];
$newPreview = wordwrap($oldPreview, $preLength, "\n", 1);
echo'<span class="smalltext"><br />', $newPreview , '</span><br />';
echo '
<small id="pages' . $topic['first_post']['id'] . '">', $topic['pages'], '</small>
</td>
<td class="windowbg2" style="padding: 0px;" align="center" valign="middle" width="17%">';
if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($modSettings['enable_mini_avatars']))
echo '<table width="100%" cellpadding="0" cellspacing="2px" border="0"><tr><td class="windowbg2" width="30%" align="center">
', $topic['first_post']['member']['avatar'],'</td><td class="windowbg2" width="70%">';
echo'
', $topic['first_post']['member']['link'], '</td>';
if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($modSettings['enable_mini_avatars']))
echo '</tr></table></td>';
echo'
<td class="windowbg' , $topic['is_sticky'] ? '3' : '' , '" valign="middle" width="4%" align="center">
', $topic['replies'], '
</td>
<td class="windowbg' , $topic['is_sticky'] ? '3' : '' , '" valign="middle" width="4%" align="center">
', $topic['views'], '
</td>
<td class="windowbg2" valign="middle" width="22%">
<a href="', $topic['last_post']['href'], '"><img src="', $settings['images_url'], '/icons/last_post.gif" alt="', $txt[111], '" title="', $txt[111], '" style="float: right;" /></a>
<span class="smalltext">
', $topic['last_post']['time'], '<br />
', $txt[525], ' ', $topic['last_post']['member']['link'], '
</span>
</td>';
// Show the quick moderation options?
if (!empty($options['display_quick_mod']))
{
echo '
<td class="windowbg' , $topic['is_sticky'] ? '3' : '' , '" valign="middle" align="center" width="4%">';
if ($options['display_quick_mod'] == 1)
echo '
<input type="checkbox" name="topics[]" value="', $topic['id'], '" class="check" />';
else
{
// Check permissions on each and show only the ones they are allowed to use.
if ($topic['quick_mod']['remove'])
echo '<a href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions[', $topic['id'], ']=remove;sesc=', $context['session_id'], '" onclick="return confirm(\'', $txt['quickmod_confirm'], '\');"><img src="', $settings['images_url'], '/icons/quick_remove.gif" width="16" alt="', $txt[63], '" title="', $txt[63], '" /></a>';
if ($topic['quick_mod']['lock'])
echo '<a href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions[', $topic['id'], ']=lock;sesc=', $context['session_id'], '" onclick="return confirm(\'', $txt['quickmod_confirm'], '\');"><img src="', $settings['images_url'], '/icons/quick_lock.gif" width="16" alt="', $txt['smf279'], '" title="', $txt['smf279'], '" /></a>';
if ($topic['quick_mod']['lock'] || $topic['quick_mod']['remove'])
echo '<br />';
if ($topic['quick_mod']['sticky'])
echo '<a href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions[', $topic['id'], ']=sticky;sesc=', $context['session_id'], '" onclick="return confirm(\'', $txt['quickmod_confirm'], '\');"><img src="', $settings['images_url'], '/icons/quick_sticky.gif" width="16" alt="', $txt['smf277'], '" title="', $txt['smf277'], '" /></a>';
if ($topic['quick_mod']['move'])
echo '<a href="', $scripturl, '?action=movetopic;board=', $context['current_board'], '.', $context['start'], ';topic=', $topic['id'], '.0"><img src="', $settings['images_url'], '/icons/quick_move.gif" width="16" alt="', $txt[132], '" title="', $txt[132], '" /></a>';
}
echo '</td>';
}
echo '
</tr>';
}
if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics']))
{
echo '
<tr class="catbg">
<td colspan="8" align="right">
<select name="qaction"', $context['can_move'] ? ' onchange="this.form.moveItTo.disabled = (this.options[this.selectedIndex].value != \'move\');"' : '', '>
<option value="">--------</option>
', $context['can_remove'] ? '<option value="remove">' . $txt['quick_mod_remove'] . '</option>' : '', '
', $context['can_lock'] ? '<option value="lock">' . $txt['quick_mod_lock'] . '</option>' : '', '
', $context['can_sticky'] ? '<option value="sticky">' . $txt['quick_mod_sticky'] . '</option>' : '', '
', $context['can_move'] ? '<option value="move">' . $txt['quick_mod_move'] . ': </option>' : '', '
', $context['can_merge'] ? '<option value="merge">' . $txt['quick_mod_merge'] . '</option>' : '', '
<option value="markread">', $txt['quick_mod_markread'], '</option>
</select>';
if ($context['can_move'])
{
echo '
<select id="moveItTo" name="move_to" disabled="disabled">';
foreach ($context['jump_to'] as $category)
foreach ($category['boards'] as $board)
{
if (!$board['is_current'])
echo '
<option value="', $board['id'], '"', !empty($board['selected']) ? ' selected="selected"' : '', '>', str_repeat('-', $board['child_level'] + 1), ' ', $board['name'], '</option>';
}
echo '
</select>';
}
echo '
<input type="submit" value="', $txt['quick_mod_go'], '" onclick="return document.forms.quickModForm.qaction.value != \'\' && confirm(\'', $txt['quickmod_confirm'], '\');" />
</td>
</tr>';
}
echo '
</table>
</div>
<a name="bot"></a>';
// Finish off the form - again.
if (!empty($options['display_quick_mod']) && !empty($context['topics']))
echo '
<input type="hidden" name="sc" value="' . $context['session_id'] . '" />
</form>';
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="middletext">', $txt[139], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . ' <a href="#top"><b>' . $txt['topbottom4'] . '</b></a>' : '', '</td>
<td align="right" style="padding-right: 1ex;">
<table cellpadding="0" cellspacing="0"> <tr>
', template_button_strip($normal_buttons, 'top'), '
</tr>
</table>
</td>
</tr>
</table>';
}
// Show breadcrumbs at the bottom too?
echo '
<div>', theme_linktree(), '<br /></div>';
echo '
<div class="tborder">
<table cellpadding="8" cellspacing="0" width="100%" class="titlebg2">
<tr>';
if (!$context['no_topic_listing'])
echo '
<td style="padding-top: 2ex;" class="smalltext">', !empty($modSettings['enableParticipation']) ? '
<img src="' . $settings['images_url'] . '/topic/my_normal_post.gif" alt="" align="middle" /> ' . $txt['participation_caption'] . '<br />' : '', '
<img src="' . $settings['images_url'] . '/topic/normal_post.gif" alt="" align="middle" /> ' . $txt[457] . '<br />
<img src="' . $settings['images_url'] . '/topic/hot_post.gif" alt="" align="middle" /> ' . $txt[454] . '<br />
<img src="' . $settings['images_url'] . '/topic/veryhot_post.gif" alt="" align="middle" /> ' . $txt[455] . '
</td>
<td valign="top" style="padding-top: 2ex;" class="smalltext">
<img src="' . $settings['images_url'] . '/icons/quick_lock.gif" alt="" align="middle" /> ' . $txt[456] . '<br />' . ($modSettings['enableStickyTopics'] == '1' ? '
<img src="' . $settings['images_url'] . '/icons/quick_sticky.gif" alt="" align="middle" /> ' . $txt['smf96'] . '<br />' : '') . ($modSettings['pollMode'] == '1' ? '
<img src="' . $settings['images_url'] . '/topic/normal_poll.gif" alt="" align="middle" /> ' . $txt['smf43'] : '') . '
</td>
</tr>';
echo '
<tr>
<td colspan=2 align="', !$context['right_to_left'] ? 'right' : 'left', '" valign="middle">
<form action="', $scripturl, '" method="get" accept-charset="', $context['character_set'], '" name="jumptoForm">
<span class="smalltext"><label for="jumpto">' . $txt[160] . '</label>:</span>
<select name="jumpto" id="jumpto" onchange="if (this.selectedIndex > 0 && this.options[this.selectedIndex].value) window.location.href = smf_scripturl + this.options[this.selectedIndex].value.substr(smf_scripturl.indexOf(\'?\') == -1 || this.options[this.selectedIndex].value.substr(0, 1) != \'?\' ? 0 : 1);">
<option value="">' . $txt[251] . ':</option>';
// Show each category - they all have an id, name, and the boards in them.
foreach ($context['jump_to'] as $category)
{
// Show the category name with a link to the category. (index.php#id)
echo '
<option value="" disabled="disabled">-----------------------------</option>
<option value="#', $category['id'], '">', $category['name'], '</option>
<option value="" disabled="disabled">-----------------------------</option>';
/* Now go through each board - they all have:
id, name, child_level (how many parents they have, basically...), and is_current. (is this the current board?) */
foreach ($category['boards'] as $board)
{
// Show some more =='s if this is a child, so as to make it look nice.
echo '
<option value="?board=', $board['id'], '.0"', $board['is_current'] ? ' selected="selected"' : '', '> ', str_repeat('==', $board['child_level']), '=> ', $board['name'], '</option>';
}
}
echo '
</select>
<input type="button" value="', $txt[161], '" onclick="if (this.form.jumpto.options[this.form.jumpto.selectedIndex].value) window.location.href = \'', $scripturl, '\' + this.form.jumpto.options[this.form.jumpto.selectedIndex].value;" />
</form>
</td>
</tr>
</table>
</div>';
// Javascript for inline editing.
echo '
<script language="JavaScript" type="text/javascript" src="' . $settings['default_theme_url'] . '/xml_board.js"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
// Hide certain bits during topic edit.
hide_prefixes.push("lockicon", "stickyicon", "pages", "newicon");
// Use it to detect when we\'ve stopped editing.
document.onclick = modify_topic_click;
var mouse_on_div;
function modify_topic_click()
{
if (in_edit_mode == 1 && mouse_on_div == 0)
modify_topic_save("', $context['session_id'], '");
}
function modify_topic_keypress(oEvent)
{
if (typeof(oEvent.keyCode) != "undefined" && oEvent.keyCode == 13)
{
modify_topic_save("', $context['session_id'], '");
if (typeof(oEvent.preventDefault) == "undefined")
oEvent.returnValue = false;
else
oEvent.preventDefault();
}
}
// For templating, shown when an inline edit is made.
function modify_topic_show_edit(subject)
{
// Just template the subject.
setInnerHTML(cur_subject_div, \'<input type="text" name="subject" value="\' + subject + \'" size="60" style="width: 99%;" maxlength="80" onkeypress="modify_topic_keypress(event)" /><input type="hidden" name="topic" value="\' + cur_topic_id + \'" /><input type="hidden" name="msg" value="\' + cur_msg_id.substr(4) + \'" />\');
}
// And the reverse for hiding it.
function modify_topic_hide_edit(subject)
{
// Re-template the subject!
setInnerHTML(cur_subject_div, \'<a href="', $scripturl, '?topic=\' + cur_topic_id + \'.0">\' + subject + \'</a>\');
}
// ]]></script>';
}
function theme_show_buttons()
{
global $context, $settings, $options, $txt, $scripturl;
$buttonArray = array();
// If they are logged in, and the mark read buttons are enabled..
if ($context['user']['is_logged'] && $settings['show_mark_read'])
$buttonArray[] = '<a href="' . $scripturl . '?action=markasread;sa=board;board=' . $context['current_board'] . '.0;sesc=' . $context['session_id'] . '">' . $txt['mark_read_short'] . '</a>';
// If the user has permission to show the notification button... ask them if they're sure, though.
if ($context['can_mark_notify'])
$buttonArray[] = '<a href="' . $scripturl . '?action=notifyboard;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';board=' . $context['current_board'] . '.' . $context['start'] . ';sesc=' . $context['session_id'] . '" onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_board'] : $txt['notification_enable_board']) . '\');">' . $txt[125] . '</a>';
// Are they allowed to post new topics?
if ($context['can_post_new'])
$buttonArray[] = '<a href="' . $scripturl . '?action=post;board=' . $context['current_board'] . '.0">' . $txt['smf258'] . '</a>';
// How about new polls, can the user post those?
if ($context['can_post_poll'])
$buttonArray[] = '<a href="' . $scripturl . '?action=post;board=' . $context['current_board'] . '.0;poll">' . $txt['smf20'] . '</a>';
return implode(' | ', $buttonArray);
}
?>
Will there soon be a release where one can specify the boards on which to use this mod? Thanks!
Quote from: samurai-lupin on April 15, 2008, 07:57:43 PM
Will there soon be a release where one can specify the boards on which to use this mod? Thanks!
That's a planned upgrade.
Thanks! Can't wait for it!
great mod thanx vbgamer45
do me afav vbgamer45 plz iam using ur mod could u give acode for for viewing the leastes
attached pictures to put on tp block
u know u gave that code for the leastes(random) pictures from the gallery
can u make that code shows the athumbnails attached
the i dea is to make something like mp3 portal on tp shows leastes albums from the
aspesific board when user clicks on apicture goes to the the topic where that pic attached
plzzzzzzzz i know can do it
How can I manually define boards on which the mod should not be applied? What code would I need to add?
Thank you
This is a really nice mod!
I have installed version of the Thumbnail Topic Mod 1.1.
But;
When I am logged out there are missing thumbnails like this
(http://i233.photobucket.com/albums/ee292/sophisim/missing.jpg)
In the posts the attachment is not showing either
When I am logged in I can see it all.
I would very much be able to see the thumbnails even when I am logged out.
How is it possible?
Quote from: sophi on April 26, 2008, 07:56:56 AM
This is a really nice mod!
I have installed version of the Thumbnail Topic Mod 1.1.
But;
When I am logged out there are missing thumbnails like this
(http://i233.photobucket.com/albums/ee292/sophisim/missing.jpg)
In the posts the attachment is not showing either
When I am logged in I can see it all.
I would very much be able to see the thumbnails even when I am logged out.
How is it possible?
I think it maybe because guest doesn't have permission to see attachements. So adding that permission would fix it.
The the mod will need to be changed in a future release so it will display a blank image instead. I also do not allow visitors to view pictures as it takes away a lot of traffic.
Quote from: vbgamer45 on April 15, 2008, 08:07:25 PM
Quote from: samurai-lupin on April 15, 2008, 07:57:43 PM
Will there soon be a release where one can specify the boards on which to use this mod? Thanks!
That's a planned upgrade.
smf 2.0? please :'( :'(
Once SMF 2.0 final is released.
Vb,
Do you plan on fixing the missing posts/thumbnail bug for your first version of this mod?
I would if I could figure out what causes it.
thanks
VB :)
For those that want this mod to work (show ALL the posts), there's an alternative for now. Go here:
http://www.simplemachines.org/community/index.php?topic=133417.msg888234#msg888234
As Vbgamer said, his Thumbnail topic was inspired by Nickos unofficial mod. While Vbgamer looks for a fix to get rid of the missing posts, follow the above link. Just follow the steps carefully. Im using Niko's hack and now all of my posts are appearing :)
And Vbgamer, you may or may have not seen this (you proably did) but it appears that Niko's hack had the same bug that you are experiencing (missing posts) and he got the fix for it.
It's explained here:
http://www.simplemachines.org/community/index.php?topic=133417.msg888293#msg888293
maybe or maybe not this will help you troubleshoot this bug.
Im still hoping for a fix and plan on upgrading to VBs mod, but in the mean time im happy with the other hack.
madman
Fixed the bug with not all posts appearing thanks to madman71 and Niko for the fix!
Thank you! Thank you! Thank you! It's like Christmas. :D I have wanted something like this and it is now working perfectly.
Thank you vbgamer! and also madman71 and Niko
Glad i could help guys. I really wanted this mod to work :D
I run a little Art Forum, and this is a great addition for it.
Many Thanks.
I am having problems with damaged package. Could someone please confirm?
Thanks.
Could you just attah the edited MessageIndex.template.php and MessageIndex.php for me, so that I can upload them to my server, couse my Package Manager don't work on my server, and I suck at installing manually..
Freaky O.o
Suuently the Pmanger works :)
Don't need help, anyway!
Quote from: samurai-lupin on April 25, 2008, 10:06:15 PM
How can I manually define boards on which the mod should not be applied? What code would I need to add?
Thank you
Is it possible to do this ?
I really like your mods vbgamer :)
I installed this mod on my forum and it works great, except for one problem. I use multiple images in a thread and I can't seem to figure out how to set things up so it will distinguish the jpeg I want to use for the "main" preview pic.
For example, if I have 3 images in a thread numbered "image_1, image_2 and image_3," instead of getting image_1 as the main thumbnail (showing on the preview page) I get image_2 (or image_3) instead.
Is there any other way to designate which image will appear first?
Edit: Finally got the thumbnails to appear in the proper order through a lot of trial and error (which wasn't easy), but I'm still experiencing a problem when adding a rar file to some threads. Doing so causes the thumbnail to disappear altogether.
Hello,
Cool script !!
Is there any way to keep the attachment image at the original size into the topic self and to have the self image resized as a thumbnail on the topic listing ?
Lot of thanks
Nicolas
Quote from: NicolasB on August 21, 2008, 11:07:34 AM
Hello,
Cool script !!
Is there any way to keep the attachment image at the original size into the topic self and to have the self image resized as a thumbnail on the topic listing ?
Lot of thanks
Nicolas
I'm also looking for this modification, is possible to make the size of the thumbnail on topic listing using other sizes instead of smf thumbnail size?
What happen is that on listing i get a cool small thumb but inside the topic i prefer a larger thumb.
Can thisbe done ?
I would apprecaite this, too!
I am very disapointed as I would like to use the mod which sounds great but after installing the mod, I get the following error message when displaying a board :
Not unique table/alias: 'big'
Fichier: /myserver/mydirectory/.../Sources/MessageIndex.php
Ligne: 484
Any idea ?? Thanks in advance
I use SMF 1.1.6 ...
Great mod, however when I try to install i get:
QuoteInstalling this package will perform the following actions: Type Action Description
1. Execute Modification ./Sources/MessageIndex.php Test successful
2. Execute Modification ./Themes/default/MessageIndex.template.php Test failed
SMF version 1.1.6 as well. It says on the mod page it should be compatible...but I dont want to risk it.
Any insights are appreciated
Quote from: Adalla on October 12, 2008, 03:18:36 AM
Great mod, however when I try to install i get:
QuoteInstalling this package will perform the following actions: Type Action Description
1. Execute Modification ./Sources/MessageIndex.php Test successful
2. Execute Modification ./Themes/default/MessageIndex.template.php Test failed
SMF version 1.1.6 as well. It says on the mod page it should be compatible...but I dont want to risk it.
Any insights are appreciated
Most likely need to install it manually. Another modification has modified that file in the same place and would need to be looked at.
Version 2 beta 4 ???
Mine is failing on MessageIndex.template.php also
For me its the Sticky First Post (extends sticky topic) mod which has replaced the first 'Find' needed in the MessageIndex.template.php
What can I do to get this to work?
You can try to modify the code manually and add it before or after the sticky first post mod.
any news on updates for this mod please
like changing the thum size with out it changing the attached image
and for it to show thums from all other post even with out side links
thanks mark
How do I use this mod with SSI.php ?
I m pulling recentposts function in SSI and wish to use this mod to pull attachment image. How can I accomplish this?
I also like to pull the image, topic title, and a couple lines of content in SSI like wordpress.
Thank you.
I
New feature: if a user doesn't add a thumbnail, is possible to have automatically a thumbnail like attached image?
Thanks!
Antonio
Please assist with version 2 beta 4 please please please. Everyone desperately needs it. I m one of them.
Oddly there are some boards wher the attachments are there and it isnt listing...
It only checks the very first attachment of each post.
Quote from: vbgamer45 on November 05, 2008, 09:39:23 PM
It only checks the very first attachment of each post.
If this is the case (1.1.6) then why is the displayed thumb random? 8 images on the thread and it displays 6 or anything but #1
It is almost a year and no update for version 2 beta 4? That's awful.
Not really most mod authors are waiting for a final release of SMF 2.0 before porting mods over.
Sorry to add to this VB, it is an excellent mod and great work from both of you.
So this mod always takes the image as being square or a horizontal, is that right ???. So if we have a vertical image, it gets squashed into a horizontal or square type image. Is it possible to add to this so that a vertical image stays vertical and horizontal stays horizontal ??
Next question. The thumbnail seems to be the same file size in KB as the original inside the post. Can compression be added to that thumbnail.
I can imagine they are not easy tasks to do, but I have to ask :). BTW, I do have one more question that you might not have thought of doing with this mod, but maybe you have ;)
Thanks for your time and effort.
Danny.
VB,
Quick question:
I have over 2000 attached images on my forum now with your mod running just fine. However, i just got a nasty gram from my web host saying im using to much CPU (yeah, shared hosting). Im thinking it might be this mod because it displays about 25 images per page. So, i need to do some trial and error testing.
If i remove this mod and then reinstall it later will the mod remember all of the posts with attachments?
I know the mod does not detect older attached images prior to installing this mod.
thanks agian. And i hope it's not your mod. If it is, i have to pay big $$ to get a VPN account and get off of the shared hosting plan that i have.
Im willing to pay the big bucks to keep this awesome mod on my board.
thanks again.
It should not really hurt performance if I remember it is just adding one left join to find out the image.
Should remember all attachments since the mod is not storing any information and is going by the first image inside each topic.
thanks Vb :)
does this need an image physically uploaded as an attachment? Or if someone posts an image using photobucket or imageshack, will a thumb also be created?
yep! physically attached is the only way it works.
I only wished it could detect free hosting site links like Imagevenue, photobucket, etc.
I know Vbulliten has a mod that does that.
I posted in vb's inspirational thread to see if it could be altered to reflect avatar height/width rather than attachment but for the time being in messages index Ive simply altered:
'width' => $row['thnWidth']/3,
'height' => $row['thnHeight']/3
so it scales it to 1/3 of the attachment size on display. Makes it a lil more conforming... I did get it humming but the posts where zips are loaded before the images are still not showing in topics.. trying to trace down the code for that aspect and going cross-eyed
;) HR, a HUGE thanks and now I'm on the right track. Wonderful and can't thank you enough ;D
Danny.
I would love to get this to scale correctly for both horizontal and vertical images. If we take a scale for a photograph at 640 x 480 in the horizontal, to get a thumb at 64 x 48 is easy and it shows correctly, but when we go to a vertical shot it seems to squash it into an almost square and the scale is way off for a vertical thumb of 48 x 64. To find a fix for this would be perfect.
Similar to what VB has for the SMF gallery (yes bought and paid for :) ) would be ideal if that could be adapted for this mod.
Anyway, thanks for your time HR, I'm looking deeper into it now.
Danny.
Quote from: nzmacro on December 02, 2008, 05:00:56 AM
;) HR, a HUGE thanks and now I'm on the right track. Wonderful and can't thank you enough ;D
Danny.
Welcome, now if we just had the thing look at all the attachments and show only the first jpg it'd be gold OR.. a lil plugin like the buddy mod where you can move an attachment up or down the list..
So so.. this is me rambling but I get the ID.ATTACH reference and what not (for the most part) perhaps it should be tweaked (if I knew how I would) so that its looking in height & width for anything that is not null.. zips and the like record a value of '0' in the database so perhaps if it hits the first attachment and its height or width in the database (attachments table) in not '0' then stop and display the thing else go on to the next and compare.
I know.. this might seem pointless to you but I will most likely look back at this later and figure a way to bandaid it and make it work
I have a new forum installed only weeks old. With a few other mods installed. This mod is working in the SMF default theme but not in a custom theme I'm using.
I tried to manually code my themed MessageIndex.template.php but the codes I need to find just aren't in there.
If I attach the MessageIndex.template.php here could someone fix it for me please?
Might but if it is too different then it may be difficiult
Quote from: vbgamer45 on January 18, 2009, 03:21:02 PM
Might but if it is too different then it may be difficiult
I have attached it. ..... thank you for giving it a go :)
EDIT: never mind I got it to work YAY!
Few question ..
Can the thumbnail size be adjusted?
Does it Show a thumbnail if and external image is linked and not attached?
Do you get a admin panel?
can you specify which boards to use this mod?
Quote from: aw06 on January 22, 2009, 03:19:21 PM
Few question ..
Can the thumbnail size be adjusted?
Does it Show a thumbnail if and external image is linked and not attached?
Do you get a admin panel?
can you specify which boards to use this mod?
None of the above are built in.
ok, so how can i change thumbnail size .. and also how do i make it see external images.
It's not coded to grab external images unfortunately :(
Im hoping one day it will
Quote from: madman71 on January 22, 2009, 10:47:55 PM
It's not coded to grab external images unfortunately :(
Im hoping one day it will
bummer .. all my images are external .. so this mod wont work ...
Any other mods that may get this done ??
no, there's no mod for SMF that will do this. There is one for VB forums though.
Quote from: aw06 on January 22, 2009, 11:09:07 PM
Quote from: madman71 on January 22, 2009, 10:47:55 PM
It's not coded to grab external images unfortunately :(
Im hoping one day it will
bummer .. all my images are external .. so this mod wont work ...
Any other mods that may get this done ??
How would that work for external images?
Since they have no thumbnails plus the mod would have to scan the post for valid image links
can it not display a pic of the first image found in a img tag ... :-\
Could but the image could really be really really big
Most of the free image hosts that use the IMG tag are for displaying thumbnails.
such as this link:
[URL=http://img127.imagevenue.com/img.php?image=86608_P1010360_5Large6_122_806lo.JPG][IMG]http://img127.imagevenue.com/loc806/th_86608_P1010360_5Large6_122_806lo.JPG[/IMG][/URL]
The first part of the link leads to the full size image, the second part will display the thumb
Quote from: vbgamer45 on January 22, 2009, 11:49:51 PM
Could but the image could really be really really big
yeah, which it why you dont display it at the original size ... set it to display at say 60x60px .. or a user customisable size
Its php codeing ,, anything is possible :P
I'm about to upgrade to SMF 2 RC1, and really miss this mod on my forum.
Maybe sometime this week
Fantastic
I'll keep watching this thread for your announcement. :D
Cool mod, 2 questions:
Is it possible for SMF 2.0 x
and can you attach a SSI function for this aswell?
Yes maybe this weekend for 2.0
What kind of SSI function you need?
Well, I would like to have an output similar like ssi_boardnews but with the topic picture. And the picture should be floated left or right, or centered if possible (just like in a newsitem). Thanx in advance!!!
I like to use this mod, is it possible to use when the in line attachment mod is installed?
How would it know to find the smaller image? Or find the large image from the small one of an external image.
vbgamer45
I see you've been busy updating some of your other mods this weekend.
Is this one far off for RC1?
Probably in a couple weeks
Quote from: vbgamer45 on February 15, 2009, 08:39:12 PM
Probably in a couple weeks
No Probs.
I look forward to using this mod again. :D
i am waiting for this mod to work with external links such as the ones coming from imageshack & photobucket.
it would be nice if this mod can scan the first images posted on a post using the [img] tags.
Quote from: pinoysim on February 19, 2009, 04:14:54 AM
i am waiting for this mod to work with external links such as the ones coming from imageshack & photobucket.
it would be nice if this mod can scan the first images posted on a post using the [img] tags.
That won't happen
Quote from: vbgamer45 on February 21, 2009, 05:36:37 PM
Quote from: pinoysim on February 19, 2009, 04:14:54 AM
i am waiting for this mod to work with external links such as the ones coming from imageshack & photobucket.
it would be nice if this mod can scan the first images posted on a post using the [img] tags.
That won't happen
oh ok. but i wish that someone might make a feature like that, i just wish that this mod can work on imageshack links. i would surely buy or pay for a mod that can work on imageshack links on the first post.
Quote from: Angelotus on February 10, 2009, 05:13:46 AM
Well, I would like to have an output similar like ssi_boardnews but with the topic picture. And the picture should be floated left or right, or centered if possible (just like in a newsitem). Thanx in advance!!!
Ditto. Any chance we can get the code to add to the SSI.php file to have the thumbnails called on an external page for the 'SSI_recentTopics' function? Would be greatly appreciated. Cheers.
I'd really like to see a selection for it, so you can choose the boards in which this mod applies :).
But I respect your work vbgamer45, in hope that I'll see more awesome stuff !
Quote from: improv on March 03, 2009, 03:06:28 PM
I'd really like to see a selection for it, so you can choose the boards in which this mod applies :).
But I respect your work vbgamer45, in hope that I'll see more awesome stuff !
Add it to my feature request tracker on smfhacks.com
I had this on a forum with the smf version being 1.1.7 and it worked great. Now that I'm using 1.1.8 the thumbnails don't show - it's as if I didn't install the mod at all. I tried it on a fresh install of 1.1.8 and same problem.
Love it.
Are you able to like make the picture in the topic with the topic name.
But not make the picture clickable?
vbgamer45
Have you had a chance to update this mod? :)
Not had a chance most likely now for RC2
Thanks
I'll keep watching with fingers crossed for the RC2.
Back again with a new question : the thumbnail in topic view is fine but when the image is displayed into the post, it is still seen as a thumbnail and not as the original large image.
What would be the setting/modification to apply in order to get it working as mentionned ??
THX
plz can u update it for rc2?
plz
Will update it for SMF 2.0 final
Why do all mod authors say they will wait for 2.0 Final ?
Who knows when that will be ?!? We are here now.. we are live.. we have needs.. and we are all on RC1
Please, if it's not to big a deal can you make this for RC1 ?
That way your mod will also almost be ready for final when that time comes.
Cheers,
Knat
Because there are many release like RC2 ..etc ... final. Takes time to support each one.
Ok.
But it's only modification on two files. would be sweet if you had the time to do it.
It's a nice mod, thanks for your hard work :)
And where could I change the size of the thumbnails?
Apparently I can't find it for some kind of reason.
It is controlled by the attachment settings I beilve.
Hmm yes somehow they are,
But if I change the size of the image it needs to be previewed first until the height and width are increased or decreased.
Pretty odd..
vbgamer45 are you think add compability 2.0 for this mod?
Planned for 2.0 final
I'm looking forward to using this mod again when 2.00 is final.
Can you make this work with only specific forums?
Possible maybe in a future release will add some settings which you can toggle this feature on or off for a forum.
Quote from: vbgamer45 on June 04, 2009, 01:33:59 PM
Possible maybe in a future release will add some settings which you can toggle this feature on or off for a forum.
that should be very nice!
I hope you will play with this mod, like move the mouse over and show full preview etc.
Installed the Thumbnail In Topic Mod and thumbnails are not showing in Topic just the same ol same ol....Why would this be?
Could be the theme I believe it only works on the default theme.
I am using the default theme. It will be the only theme I will be using.
Hello
I have a couple of questions regarding this mode:
Is it possible to use as thumbnail something other then attached image?
Because I will want to use forum for commenting images in site-s gallery, and I will want to make it something like this:
Topic listing:
http://forums.cgsociety.org/forumdisplay.php?f=121
Single topic:
http://forums.cgsociety.org/showthread.php?f=121&t=771681
When user will upload image to his gallery, automatically will be created new topic for that image, and in first post will be scaled down image (witch will be also link for full preview) and description. I don't want to put image as attachment, becouse that way I will have to upload original image twice on my site. I want to use already made thumbnail (by site-s gallery) and scale down version of image in post (not as attachment).
So basically, I just need to know if is possible to change witch image will be shown as topic thumbnail.
And second question; I'm using custom theme on forum... is this a problem?
Great mod, but there should be a feature which forces users to upload a picture, and maybe a way to moderate out bad pictures.
Updated!
Added support for SMF 2.0
Hi,
Thanks for looking I hope you can help.
I have your mod 1.1.1 and the default theme with vers. 1.1.10 and the problem is when the sticky post has an image.
If the sticky post has an image the color on the right in the "last post" section is gray. you can see that example on my site here:
http://treasuredigging.com/welcome/
The element that is affected is titlebg, it looks like a windowbg2 element is created on sticky posts with an image.
If the sticky topic has no image all is well as seen on my site here:
http://treasuredigging.com/site-feedback/
TDNY
I don't think you posted in the right topic.
Quote from: vbgamer45 on July 19, 2009, 12:05:05 PM
Updated!
Added support for SMF 2.0
thanks, nice work!!!
Quote from: vbgamer45 on July 28, 2009, 10:29:15 AM
I don't think you posted in the right topic.
I'm pretty sure I posted in the right spot, your mod works fine except when the topic is a sticky with an image. Did you look at the 2 links I posted? If I need to post somewhere else I'm all ears. I appreciate the help 8)
TDNY
Quote from: vbgamer45 on July 28, 2009, 10:29:15 AM
I don't think you posted in the right topic.
You're right, this has been fixed.
It was a problem with another mod that we installed manually and wasn't added to the list.
Sorry for the trouble but it did look like a problem when an image was posted in a topic and it was stickied.
TDNY
Quote from: TDNY on July 29, 2009, 08:33:21 AM
Quote from: vbgamer45 on July 28, 2009, 10:29:15 AM
I don't think you posted in the right topic.
You're right, this has been fixed.
It was a problem with another mod that we installed manually and wasn't added to the list.
Sorry for the trouble but it did look like a problem when an image was posted in a topic and it was stickied.
TDNY
can you tell me how you fixed it, because I have the same problem.
Quote from: qtime on July 29, 2009, 10:27:11 AM
can you tell me how you fixed it, because I have the same problem.
Sure,
Open up your themes Messageindex.template.php and find this
$stickybar = false;
$normalbar = false;
foreach($context['topics'] as $topic)
{
if($topic['is_sticky'] && !$stickybar)
{
echo'<tr class="titlebg"><td colspan="', empty($options['display_quick_mod']) ? '7' : '8', '"><b>Important Topics</b></td></tr>';
$stickybar = true;
}
else if(!$topic['is_sticky'] && $stickybar && !$normalbar)
{
echo'<tr class="titlebg"><td colspan="', empty($options['display_quick_mod']) ? '7' : '8', '"><b>Normal Topics</b></td></tr>';
$normalbar = true;
}
Replace it with this
$stickybar = false;
$normalbar = false;
foreach($context['topics'] as $topic)
{
if($topic['is_sticky'] && !$stickybar)
{
echo'<tr class="titlebg"><td colspan="', empty($options['display_quick_mod']) ? '8' : '9', '"><b>Important Topics</b></td></tr>';
$stickybar = true;
}
else if(!$topic['is_sticky'] && $stickybar && !$normalbar)
{
echo'<tr class="titlebg"><td colspan="', empty($options['display_quick_mod']) ? '8' : '9', '"><b>Normal Topics</b></td></tr>';
$normalbar = true;
}
Good Luck,
TDNY
I set my attachment size in ?action=manageattachments but the thumbnails on the topic list are still huge...
what could be doing this?
Quote from: improv on May 15, 2009, 07:06:55 AM
Hmm yes somehow they are,
But if I change the size of the image it needs to be previewed first until the height and width are increased or decreased.
Pretty odd..
I am experiencing same issue... using SMF 1.1.10
Default thumbnail where no attachment exists
Ok firstly thanks for this great mod! I searched around for an extra feature which I couldnt find so I made a small change myself. What I wanted was for those posts that dont have any attached images to show a default thumbnail in the message index. Let me just say Im in no way a PHP programmer so this is hardcoded but at least it works! The defaultthumbnail.jpg I manually sized as 100x100.
In MessageIndex.template.php
find
echo '<a href="', $topic['first_post']['href'], '"><img src="', $image['url'], '" width="', $image['width'], '" height="', $image['height'], '" alt="" /></a>';
$imagefound = true;
}
add after
// MOD to show default thumnail image
else
{
echo '<img src="http://www.site.com/defaultthumbnail.jpg">';
$imagefound = true;
}
// END MOD to show default thumbnail image
Nice maybe I can add it to next release
Thanks for updating this to 2.0 ;)
I might use it on a new board i have planned.
thanks for that code iosys.
my question is rather simple, but unfortunately, I haven't been able to find a solution. I'd like to give the column a title, where as it is currently blank. On the same top bar as menu, started by, etc... I'd like to put "Thread Preview" on the descriptive column at the top of the thumbnails.
**never mind. I found the code in the messageindextemplate file. I'm just having trouble positioning the text above that column.
Quote from: fmsllc on August 30, 2009, 03:18:32 PM
thanks for that code iosys.
my question is rather simple, but unfortunately, I haven't been able to find a solution. I'd like to give the column a title, where as it is currently blank. On the same top bar as menu, started by, etc... I'd like to put "Thread Preview" on the descriptive column at the top of the thumbnails.
**never mind. I found the code in the messageindextemplate file. I'm just having trouble positioning the text above that column.
When you figure it out post how you did it because thats something Id use too
It would probably be in an empty <td> tag in the main header of the messageindex.template.php
Yeah there is two different areas I think. I played around with it for a while but got annoyed. I want to have the first two columns removed. I could get the header columns removed but when I tried to do the same with the content columns it screwed up the formatting. I had other things to do so left it for now. Would love to know if someone has got this to work
i attached a pic of what i did.
in that same messageindextemplate file....I used this
<td width="9%" colspan="', $context['show_thumbnails'] ? 3 : 2, '" class="catbg3"> Thread Preview</td>
if you do not have a thread with an attachment on that page though, it comes out looking weird.
This mod is very nice. Im using it with SMF 2RC. Something i wanna ask :
1. Can i select particular board to display this mod? i dont want to display it in all boards, just the events page.
2. How can i resize the thumbnail? it would be great if we can select the size. i got the picture in 100% in all of the topics...
there's a good php thumbnailer, if youre interested in using it : http://phpthumb.sourceforge.net/
1. Not at this time
2. This is determined by the attachment settings it uses those sizes as its base.
Thanks Dude Very Very Much :P
Glad you enjoy the mod
I like this option, but there needs to be a option to "enforce" it on a board, so people cannot make a thread without a image, so maybe make a seperate box which they have to upload the image to, it's more direct than attachments.
Quote from: iosys on August 13, 2009, 10:16:17 AM
Default thumbnail where no attachment exists
Ok firstly thanks for this great mod! I searched around for an extra feature which I couldnt find so I made a small change myself. What I wanted was for those posts that dont have any attached images to show a default thumbnail in the message index. Let me just say Im in no way a PHP programmer so this is hardcoded but at least it works! The defaultthumbnail.jpg I manually sized as 100x100.
In MessageIndex.template.php
find
echo '<a href="', $topic['first_post']['href'], '"><img src="', $image['url'], '" width="', $image['width'], '" height="', $image['height'], '" alt="" /></a>';
$imagefound = true;
}
add after
// MOD to show default thumnail image
else
{
echo '<img src="http://www.site.com/defaultthumbnail.jpg">';
$imagefound = true;
}
// END MOD to show default thumbnail image
just want to say thanks for this add on. It makes the forum look a lot cleaner now.
Looks like a good feature may add an interface for it in the future.
Im trying to have a thumb in listing and the original large image inside the topic.
example 1: "Resize images when showing under posts" is OFF in admin panel.
Result: When I attach a image to a topic it show the original large image in listing and inside the topic.
example 2: "Resize images when showing under posts" is ON in admin panel.
Result: When I attach a image to a topic it show the thumb in listing. But inside the topic it show a clickeable thumb to enlarge to the original image size.
All i want its a thumb in listing and the larger image inside the topic without have to click, its that possible?
excuse my english.
grettings and thanks in advance.
Can this mod also be adjusted in order to work with the recent replies / postings pages?
For my custom theme, I tried editing the messageindex.template.php myself but I get a syntax error.
Could you be so kind to take a look @ the file and see if you could fix it for me?
TIA!
Edit: Success at last! found it myself. Great mod!!
Hi,
great mod but on SMF 2.0 RC1.2 in MessageIndex.php I can't find this code:
LEFT JOIN {db_prefix}members AS meml ON (meml.id_member = ml.id_member)
LEFT JOIN {db_prefix}members AS memf ON (memf.id_member = mf.id_member)
But this:
LEFT JOIN {db_prefix}members AS meml ON (meml.id_member = ml.id_member)
LEFT JOIN {db_prefix}members AS mav ON (mav.id_member = ml.id_member)
If I try to replace with this, I have blank page:
LEFT JOIN {db_prefix}attachments AS big ON (big.id_msg = mf.id_msg AND big.attachment_type = 0)
LEFT JOIN {db_prefix}attachments AS thn ON (thn.id_attach = big.id_thumb)
LEFT JOIN {db_prefix}members AS meml ON (meml.id_member = ml.id_member)
LEFT JOIN {db_prefix}members AS memf ON (memf.id_member = mf.id_member)
Thank You very much!! :)
Quote from: JulesW on October 25, 2009, 04:09:37 PM
For my custom theme, I tried editing the messageindex.template.php myself but I get a syntax error.
Could you be so kind to take a look @ the file and see if you could fix it for me?
TIA!
Edit: Success at last! found it myself. Great mod!!
I think that is my same problem....
How have you fix it?
Thank You!
I found the error in the code, there was a piece of the code that wasn't in the right spot...
If you attach your messageindex.template.php I can take a look if I can fix it for ya...
Edit: I must add that I use smf 1.1.10 and not 2.0, so I'm not sure I can help!
OK!
Say me what do you have change in the code please...
Thanks.... :)
I've made all the necessary edits in this file. Was this the file from your server or did you attach a clean copy of the file. In this file there were no edits at all and for the mod to work, the MessageIndex.php file also needs to be editted.
new file is attached. Hope it works for you!
Ok I attack also the messageindex.php..
In this file I can't find this code:
LEFT JOIN {db_prefix}members AS meml ON (meml.id_member = ml.id_member)
LEFT JOIN {db_prefix}members AS memf ON (memf.id_member = mf.id_member)
But this:
LEFT JOIN {db_prefix}members AS meml ON (meml.id_member = ml.id_member)
LEFT JOIN {db_prefix}members AS mav ON (mav.id_member = ml.id_member)
Thanks Very Very Much!
OK, try this one and let me know if it works. I do not use the smf 2.0 RC2 version, so I cannot test it for you.
If it does not work, I can't help you any further, and you should find someone else or the creator of the mod. The
LEFT JOIN {db_prefix}members AS meml ON (meml.id_member = ml.id_member)
LEFT JOIN {db_prefix}members AS memf ON (memf.id_member = mf.id_member)
is part of the SMF 2 rc1 code, and apparently that has changed in the RC2 version.
modified file is attached.
Thanks You Julesw for your Help ;)
In 2.0 RC1.2 this mod don't work also I use Julesw's file :(
Bye!
Might need to do a manual install seems to be a bug with SMF's package parser.
Quote from: NeoXII on October 26, 2009, 07:31:52 AM
Hi,
great mod but on SMF 2.0 RC1.2 in MessageIndex.php I can't find this code:
LEFT JOIN {db_prefix}members AS meml ON (meml.id_member = ml.id_member)
LEFT JOIN {db_prefix}members AS memf ON (memf.id_member = mf.id_member)
But this:
LEFT JOIN {db_prefix}members AS meml ON (meml.id_member = ml.id_member)
LEFT JOIN {db_prefix}members AS mav ON (mav.id_member = ml.id_member)
If I try to replace with this, I have blank page:
LEFT JOIN {db_prefix}attachments AS big ON (big.id_msg = mf.id_msg AND big.attachment_type = 0)
LEFT JOIN {db_prefix}attachments AS thn ON (thn.id_attach = big.id_thumb)
LEFT JOIN {db_prefix}members AS meml ON (meml.id_member = ml.id_member)
LEFT JOIN {db_prefix}members AS memf ON (memf.id_member = mf.id_member)
Thank You very much!! :)
Hi Vbgamer45,
yes I think so but I have problem above...
Thank You!
Change
LEFT JOIN {db_prefix}attachments AS big ON (big.id_msg = mf.id_msg AND big.attachment_type = 0)
LEFT JOIN {db_prefix}attachments AS thn ON (thn.id_attach = big.id_thumb)
LEFT JOIN {db_prefix}members AS meml ON (meml.id_member = ml.id_member)
LEFT JOIN {db_prefix}members AS memf ON (memf.id_member = mf.id_member)
To
LEFT JOIN {db_prefix}attachments AS big ON (big.id_msg = mf.id_msg AND big.attachment_type = 0)
LEFT JOIN {db_prefix}attachments AS thn ON (thn.id_attach = big.id_thumb)
LEFT JOIN {db_prefix}members AS meml ON (meml.id_member = ml.id_member)
LEFT JOIN {db_prefix}members AS mav ON (mav.id_member = ml.id_member)
ok...
this is the error message after your tips...
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INNER JOIN smf_messages AS ml ON (ml.id_msg = t.id_last_msg)
INNER JOIN smf_' at line 17
File: /MessageIndex.php
Riga: 428
Can you attach the file? Are you using MySQL?
Yes I have mysql on my server.....
In Smf 1.1.10 your mod work perfectly!
Ok I attach the file..
Fixed file attached
Hello, can this mod also be adjusted so it will display a thumbnail on the new posts / replies index page?
Ok Vgamer45, now mod work perfect!!
Thanks for your help... ;)
How can I do to have not only the first attached on Thumbnail but also other attached in Topic?
My curiosity is because I have a forum of Computer Graphics.
Users open work in progress and it would be interesting to have a preview of the work...
Thank you... excuse me if my english is not very good. :)
QuoteChange
Code: [Select]
LEFT JOIN {db_prefix}attachments AS big ON (big.id_msg = mf.id_msg AND big.attachment_type = 0)
LEFT JOIN {db_prefix}attachments AS thn ON (thn.id_attach = big.id_thumb)
LEFT JOIN {db_prefix}members AS meml ON (meml.id_member = ml.id_member)
LEFT JOIN {db_prefix}members AS memf ON (memf.id_member = mf.id_member)
To
Code: [Select]
LEFT JOIN {db_prefix}attachments AS big ON (big.id_msg = mf.id_msg AND big.attachment_type = 0)
LEFT JOIN {db_prefix}attachments AS thn ON (thn.id_attach = big.id_thumb)
LEFT JOIN {db_prefix}members AS meml ON (meml.id_member = ml.id_member)
LEFT JOIN {db_prefix}members AS mav ON (mav.id_member = ml.id_member)
Strange, that's what I did as well... must have made a mistake somewhere.
A well, glad you got it sorted!
Yeah look at the file that I fixed and compare it to see if you made any differences.
This Mod is exactly what I am looking for on my forum. :D Its why I decided to stay with SMF ;D
Im using SMF 2.0 RC1.2
I uploaded it and it installed with no errors but Im not sure where to go to turn on the option (from reading this thread, it looks like you turn something on).
Anyway, not sure what I need to do or where to go in the Admin section.
Thanks
There is no settings in the admin panel.
If you are using a custom theme it will require an edit to a file in the custom theme.
Quote from: vbgamer45 on October 30, 2009, 12:30:43 PM
There is no settings in the admin panel.
If you are using a custom theme it will require an edit to a file in the custom theme.
Ok, ummmmm what file would I edit and exactly what do I need to edit? Or where do I find the information to edit.
Im computer illiterate most of the time :P
Thanks Bunches :D
QuoteOk, ummmmm what file would I edit and exactly what do I need to edit? Or where do I find the information to edit.
you can use a package parser to check which files you need to edit, you can also parse the installation instructions at the download site of the mod
How can I modify your code to see the last attachments in topic?
Complicated?
Thank You :)
Little bit you can check out the install instructions and try to modify it except going to be hard to figure out what the last attachment is probably another sql query is needed. or if you can get the last attachment id somehow.
Hello, can this mod also be adjusted so it will display a thumbnail on the new posts / replies index page?
Probably don't know the code to do it though.
Quote from: JulesW on October 30, 2009, 01:34:00 PM
QuoteOk, ummmmm what file would I edit and exactly what do I need to edit? Or where do I find the information to edit.
you can use a package parser to check which files you need to edit, you can also parse the installation instructions at the download site of the mod
I just tried opening the parse instructions for RC1.2 and they said it wasnt compatible and wont show the instructions for manual install.
Not sure what to do now.
QuoteI just tried opening the parse instructions for RC1.2 and they said it wasnt compatible and wont show the instructions for manual install.
Not sure what to do now.
MessageIndex.template.phpFind:
<th width="9%" colspan="2" class="catbg3 headerpadding"> </th>
Replace:
<th width="9%" colspan="', $context['show_thumbnails'] ? 3 : 2, '" class="catbg3 headerpadding"></th>
Find:echo '
<tr>
<td class="windowbg2 icon1">
<img src="', $settings['images_url'], '/topic/', $topic['class'], '.gif" alt="" />
</td>
<td class="windowbg2 icon2">
<img src="', $topic['first_post']['icon_url'], '" alt="" />
</td>
Replace:echo '
<tr>
<td class="windowbg2 icon1">
<img src="', $settings['images_url'], '/topic/', $topic['class'], '.gif" alt="" />
</td>
<td class="windowbg2 icon2">
<img src="', $topic['first_post']['icon_url'], '" alt="" />
</td>';
// Thumbnail Topic Mod
if ($context['show_thumbnails'])
{
echo '<td class="windowbg2" valign="middle" align="center">';
$imagefound = false;
foreach ($topic['image'] as $image)
{
if ($imagefound == true)
break;
if (isset($image['id']))
{
echo '<a href="', $topic['first_post']['href'], '"><img src="', $image['url'], '" width="', $image['width'], '" height="', $image['height'], '" alt="" /></a>';
$imagefound = true;
}
}
echo '</td>';
}
// End Thumbnail Topic Mod
echo '
Ok, I found this info under MessageIndex.php
and this is all I found...
Quote// Grab the appropriate topic information...
if (!$pre_query || !empty($topic_ids))
// Thumbnail Topic Mod
if (isset($modSettings['photo_boards']))
$modSettings['photo_boards'] = explode(',', $modSettings['photo_boards']);
else
$modSettings['photo_boards'] = array($board);
// Used to decide if we thumbnails are shown on this topic listing page
$context['show_thumbnails'] = false;
// End Thumbnail Topic Mod
{
// For search engine effectiveness we'll link guests differently.
I cant seem to find a MessageIndex.Templete.php
QuoteI cant seem to find a MessageIndex.Templete.php
Its in the theme folder.(themes/themename) Could be that your theme doesn't have its own file, but then the default file would be used, and that one should be edited when you installed the mod through. What theme are you using?
Quote from: JulesW on November 10, 2009, 02:30:23 PM
QuoteI cant seem to find a MessageIndex.Templete.php
Its in the theme folder.(themes/themename) Could be that your theme doesn't have its own file, but then the default file would be used, and that one should be edited when you installed the mod through. What theme are you using?
Im using BacknBlack by Crip
Update: I just checked my default template and the thumbnail is not working in that either. So Im going to look and see if I can find the info in the messageindex.template.php
I saw that your theme does not have its own messageindex.template file, so the edits should be present in the default template file.
The mods shows the first attachment to a post, so that should be an image file. It does not show the first image in the post (just making sure you have a image file attached)
I did not have to switch it on (I'm using 1.1.10, not sure that makes a difference)
Quote from: JulesW on November 10, 2009, 02:54:14 PM
I saw that your theme does not have its own messageindex.template file, so the edits should be present in the default template file.
The mods shows the first attachment to a post, so that should be an image file. It does not show the first image in the post (just making sure you have a image file attached)
I did not have to switch it on (I'm using 1.1.10, not sure that makes a difference)
Oh, I think I put just an image and not an image attachment. Now I feel really stupid :-[
Now I have to figure out how to attach an image.
It should be under "aditional options" when you reply to a post (not quick reply)
In admin panel you have to check if you allow users to post attachments. Its in the Attachments and avatar section of the admin panel
Quote from: JulesW on November 10, 2009, 03:12:59 PM
It should be under "aditional options" when you reply to a post (not quick reply)
In admin panel you have to check if you allow users to post attachments. Its in the Attachments and avatar section of the admin panel
Got it! ;D Though I do feel like a moron. Yes, I missed somewhere that it has to be an attachement. Plus I had disabled attachments, so that didnt help in the least.
Thank you sooo much for the help. Sometimes its just so simple yet we cant see it ::)
Glad I could help! Glad you got it sorted!
J
Updated for SMF 2.0 RC2!
Hi, i have a problem with this mod, I attached a large image to a topic, in listing the image is large too, not a thumb, any idea?
edit: The image is large only when i have "Resize images when showing under posts" OFF in admin panel.
However if i turn on these option, the listing show a thumb but inside the topic it show a clickeable thumb too!
Exist any way to show a large image inside the topic? not a "click to enlarge" thumb?
Somebody have this problem too?
excuse my english.
grettings and thanks in advance.
Javier
Works just fine on my SMF 2.0 RC2.
I was wondering if there was any way to have this work for show posts since last visit ?
(/index.php?action=unread)
Cheers,
Tanks
QuoteExist any way to show a large image inside the topic? not a "click to enlarge" thumb?
Upload the pic to photobucket (or any other picturehosting website and put the link between [img] tags in the post or am I thinking too simple now?
Hi, thanks for reply,
Not sense to me, the propose of this mod its just to show a thumb of a attached image in listing.
My english language its not good, so i will try to explain with images:
The thing its the smf configuration affect the way this mod works, a little Example:
Case 1 - "Resize images when showing under posts" is OFF in admin panel
(http://jpracing.racerplanet.com/modproblem02.jpg)
The result its:
Inside the topic it show the attached image in original size: (correct)
(http://jpracing.racerplanet.com/modproblem_topicbig.jpg)
BUT it show in the listing the image in the original size too! (incorrect)
(http://jpracing.racerplanet.com/modproblem_big.jpg)
Case 1 - "Resize images when showing under posts" is ON in admin panel
(http://jpracing.racerplanet.com/modproblem01.jpg)
The mod take the 200 pixels x 200 pixels config.
The result its:
So in listing it show the correct thumb size (200x200) (correct)
(http://jpracing.racerplanet.com/modproblem_small.jpg)
BUT Inside the topic now it show the attached image in clickeable thumb size: (incorrect, i would like a original size image not a 200x200 clickeable thumb, its thats possible? just as vbulletin)
(http://jpracing.racerplanet.com/modproblem_topicsmall.jpg)
vbgamer45 thanks a lot, you made a very good job with this mod.
thanks in advance, grettings.
Javier
What I always do is attach an image and show that as a thumbnail, ( with resize images when showing under posts ON) so on the topic listing it shows the thumbnail as you showed. Next, when you upload your image to i.e. photobucket, or imageshack you can put the link to the image between [img] [ /img] so it shows the image in the post as a large image.
A quick question :)
Why is it that this mod sometimes insist on showing the second attached image instead of the first attached image ??
I have the following error:
Not unique table/alias: 'big'
Fájl: /public_html/Sources/MessageIndex.php
Sor: 446
I have mods installed but as i saw none of them have modified Sources/MessageIndex.php.
I have no idea what to do.
I made a test forum and on that forum it works perfect.
Btw i have modified it a little bit: http://teszt.rapszajt.com/index.php?board=1.0 (http://teszt.rapszajt.com/index.php?board=1.0)
cool :D
Help me pls, thx.
I attached the .php file.
EDIT: I solved this, i dunno what was the problem, i simply overwrited the file with the working one form the test forum ( barbarian huh? ) :)
Could there be an option of which thumbnail to show? That'd be epic!
Quote from: Tanks on November 12, 2009, 10:46:07 AM
A quick question :)
Why is it that this mod sometimes insist on showing the second attached image instead of the first attached image ??
It only does every so often for me. Strange :/
Quote from: iKorp on November 15, 2009, 08:26:01 AM
Could there be an option of which thumbnail to show? That'd be epic!
Quote from: Tanks on November 12, 2009, 10:46:07 AM
A quick question :)
Why is it that this mod sometimes insist on showing the second attached image instead of the first attached image ??
It only does every so often for me. Strange :/
Yeah it only happens sometimes, very strange bug ay ? :D
I love this mod, but as requested in 2008 by sombody else, this mod definately needs a option to turn it on in selected boards, it can be a bit messy, round whole forum, especialy on boards that dont contain many attachments, but i realy do want this mod, as theres plenty of boards which are used mainly to attach images, just wis i could select them boards for it to be activated on..
I believe last time i used this mod i set boards to use a different theme, and only installed the mod on that theme, but thats one hella annoying way todo it lol.
Do you think this feature will be far along?
Thanks for all the work you do its a great mod!
Probably a couple months away before adding more features.
Quote from: vbgamer45 on November 24, 2009, 09:43:08 PM
Probably a couple months away before adding more features.
Aww... I was kinda hoping you would do it by at least January :P
Features id like to see:
-Option to enforce uploading image (from thread, not attachment)
-Option to place a template over the image (watermarks)
I have smf default core vers. 1.1.11, Here is a link to a problem I had when I changed permissions. When I made it so guests can't view attachments, there were problems logging in on any board that had thumbnails on the topic. I removed the mod and do not have the problem anymore. Here is the thread.
http://www.simplemachines.org/community/index.php?topic=351366.0 (http://www.simplemachines.org/community/index.php?topic=351366.0)
TDNY
Hello,
how can i put your mod here?
http://i50.tinypic.com/2q0nlsw.png
thanks you
You would have to modify the MessageIndex.template.php and change the order of the columns
this mod is what i need...
i just want it to have some function like selecting particular boards and the ability to set thumbnail size in topic listing.
please update thanks
Size is controlled by your attachment and avatars settings
i am having a similar prob put 20 by 20 in attachments settings yet still 100 by 100
just checked my server and my gif has become a binary file as attached is this right
Quote from: vbgamer45 on December 15, 2009, 03:25:37 PM
Size is controlled by your attachment and avatars settings
ok I will ask the question again,,,,,,,,,,,
whatever size attachment i upload it does not resize it, is it this mod or something else,,,,
If it is this then please explain how I overcome these issues.
If not then where do I go?
That's the only place for settings. This mod does not add any settings to control sizes. You might have to edit the source of MessageIndex.template or MessageIndex.php to get the size needed
Thanks
Foubd This
'width' => $row['thn_width'],
'height' => $row['thn_height']
Do not understand syntax THn
Akhhhh Think I have found it
Sorry to be a pain but just trying to sort it,,, I know you are all busy, but hey it teaches me????
echo '<a href="', $topic['first_post']['href'], '"><img src="', $image['url'], '" width=20"', $image['width'], '" height=20"', $image['height'], '" alt="" /></a>';
Ha haaaaaaa found it and done it thanks
Its in the message index template.
Glad you got it!
Cool mod, thing to make it work better is selecting which boards to show a thumbnail and the others remain the same. Otherwise great mod!
Any chance on adding the core into your code, I dont like doing manual editing of files and I have no intention of using the crappy curve theme.
its very easy to do.
in themes/core/MessageIndex.template.php
Find
<th width="9%" colspan="2" class="catbg3 headerpadding"> </th>
replace with
<th width="9%" colspan="', $context['show_thumbnails'] ? 3 : 2, '" class="catbg3 headerpadding"> </th>
Find
<td class="', $alternate_class, ' icon2">
<img src="', $topic['first_post']['icon_url'], '" alt="" />
</td>
Replace with
<td class="', $alternate_class, ' icon2">
<img src="', $topic['first_post']['icon_url'], '" alt="" />
</td>';
// Thumbnail Topic Mod
if ($context['show_thumbnails'])
{
echo '<td class="windowbg2" valign="middle" align="center">';
$imagefound = false;
foreach ($topic['image'] as $image)
{
if ($imagefound == true)
break;
if (isset($image['id']))
{
echo '<a href="', $topic['first_post']['href'], '"><img src="', $image['url'], '" width="', $image['width'], '" height="', $image['height'], '" alt="" /></a>';
$imagefound = true;
}
}
echo '</td>';
}
// End Thumbnail Topic Mod
echo '
</td>
Please add this to your install file
Thanks
What does it do?
Quote from: vbgamer45 on January 03, 2010, 01:59:24 PM
What does it do?
This is just what needs to be replaced so that the CORE theme in RC2 will show previews just like the CURVE theme does.
Have just noticed something,,,,
When you create a new topic pictures work fine.
When it is an old topic before install of this mod and you add a pic it does not show?
i installed the mod and went to a topic and added a attachment but it doesn't show in the forum that the topic exists..but is shows in the topic itself..any idea??
bet if you create a new topic it works
Nop i tried to create a new topic but still it doesn't show still..
Is it possible to make the first image show up in the calendar is it is linked to a post as an event? O:)
Not currently.
Hello,
I have install this mod but it don't work on my site, i have a buy and sell site and using smf. I want to make some cahnges to my site and if you can help me tell me how much is the damage, and my e-mail
[email protected] thank you
Dennis
Hello
I need a modification for my site ******blerje.info, if you can t see the link search on google Gazeta ******blerje all i need is a modification to display thumbnail on board where topics are listed, Can any one help me, my e-mail is
[email protected] and i can pay something for this mod.
Thank you
Ps I have try all modifications on modifications section but they don t workon my site
Updated for SMF 2.0 RC3!
work's perfect in RC3,
Thanks for this mod!!
No problem glad you enjoy it.
Quote from: Constantin Os on March 29, 2010, 06:59:00 AM
is there possibility to fix thumbnail size, as example 80*80? may be change some thing in code ?
It will output the same thumbnail size as you the attachment thumbnails that are shown below a post.
Best thing is to set a fixed width and leave the height alone. this will look best in your design.
You can change the thumbnail size under # Administration Center » Attachments and Avatars » Attachment Settings
Can anyone give me some assistance?
Im running SMF 2.0 RC3 with a custom theme (BlackRain2)
This theme has it's own Messageindex.Template file. I can not locate the code in it to replace.
Can i have a second set of eyes look at mine (attached) to verify that im not going blind?
thanks
All is well now.
I just followed these instructions
http://www.simplemachines.org/community/index.php?topic=232539.msg2350858#msg2350858
I need some help with this mod,
In trying to find (from comment #6) in the script
QuoteFor that you'll need to go here /index.php?action=manageattachments and change the
Maximum width of thumbnails:
Maximum height of thumbnails:
That should do it.
Where exactly do I look for this. Im trying to control the size of the images in the topic list, to 50 pixels height and 60 width. Ive made this type of change before, but I just cant seem to locate /index.php?action=manageattachments My forum version is 1.1.11
To change the maximum size of posted images:
As an Administrator » Configuration » Features and Options » Basic Features
To change the maximum size of attached images:
As an Administrator » Forum » Attachments and Avatars Manager » Attachment Settings
I remember I had to have a tradeoff with the attached images mod but cant remember which of these I had to set. Anyway try them and you should be right.
The online manual for smf is here:
http://docs.simplemachines.org/index.php?board=7.0
Hi iosys,
Thanks for the reply. Ya, last night I was all over the ACP. Before I go any further I should mention that I had to install a mod a while back, in order to use inline attachments. The link to my topic in 1.x support is here-
http://www.simplemachines.org/community/index.php?topic=364410.0
After the mod was installed, there was a problem with the images mirroring under the post's. So inturn I had to change the script a little. Actually the change was very minor. It was changing this- if ($attachment['is_image']) to this- if ($attachment['is_image'] && 1 != 1) pretty simple, I used ftp to do it.
However I do not believe this is causing my problem. But it could be related.
I must keep the box checked "Display image attachments as pictures under post: " in "Attachment Settings" in order to see the inline attachments at all, or they will disppear without that box checked.
Here's whats acting weird, in "attachment settings" if I check the box for "Resize images when showing under posts: " Then if I click on those images with that box checked, in the topic list, both the inline attachments and the images will be set to what I have set in "Attachment Settings" under max height and width of thumbnails. Then once I veiw both images (from topic list and inline, then uncheck that box [resize under posts]) the topic list images will stay at my thumbnail setting, and the inline attachments will be full size as they should be. Im other words, everything looks how I would like, after I do that. like I said, weird.
For what is worth I would still like to find the script that-
QuoteFor that you'll need to go here /index.php?action=manageattachments and change the
Maximum width of thumbnails:
Maximum height of thumbnails:
That should do it.
I just need to be able to find it with ftp, which directory its in, etc.
Best
Jeremy
Can somebody alter my php file attached it causes errors in my forum because i have different code and when I edit it; it will not work.
Never mind I have done it!
Quote from: iosys on April 20, 2010, 06:03:54 PM
To change the maximum size of posted images:
As an Administrator » Configuration » Features and Options » Basic Features
To change the maximum size of attached images:
As an Administrator » Forum » Attachments and Avatars Manager » Attachment Settings
I remember I had to have a tradeoff with the attached images mod but cant remember which of these I had to set. Anyway try them and you should be right.
The online manual for smf is here:
http://docs.simplemachines.org/index.php?board=7.0
this is fine but if you wish to enlarge the size of the posted image then the image in the topic enlarges as well
the best way is to open the message index template php in themes your theme and find this
echo '<a href="', $topic['first_post']['href'], '"><img src="', $image['url'], '" width="', $image['width'], '" height="', $image['height'], '" alt="" /></a>';
and simply replace to the size you wish,, this way it stays fixed
so replace with this
echo '<a href="', $topic['first_post']['href'], '"><img src="', $image['url'], '"
width=20"', $image['width'], '"
height=20"', $image['height'], '" alt="" /></a>';
Ahhh, not to sure about that.
Im looking for
Quote/index.php?action=manageattachments and change the
Maximum width of thumbnails:
Maximum height of thumbnails:
Also I am using a custom theme, never the less, im looking in the "default" theme for this code, a simple confermation that its there would be nice. I plan on going thru the whole file/script tommorrow, looking for it. After that im not sure where to look.
In doing what I mentioned above, I am getting the result I want, so I may just do nothing, I checked my forum on a remote/different computer and the forum looks good/ sofar the change seems to stick.. So, I do have a work-around at this time. Just being nitpicky I guess. I had a guy make my custom theme as a gift, for my forum, he has both Admin and ftp access, nice fellow, can't thank him enough. He's also been helping me with a gif animation control slider, and possibly a flash animation fer my main site.
Best
Jeremy
Yeah Id leave it alone for two reasons. 1. If it aint broke dont try to fix it and 2. I have done a number of different smf sites now in 1.1.x and 2.0 and Ive come to the conclusion that custom coding isnt the way to go unless youre fully committed to the extra time and headaches. The first site I did I custom coded everything but then any mod I wanted to install after that came up with errors cause the code had changed lines. Anyway if you can achieve the result without touching the back end thats ideal. :) happy days
QuoteIm looking for
index.php?action=manageattachments and change the
Maximum width of thumbnails:
Maximum height of thumbnails:
Also I am using a custom theme, never the less, im looking in the "default" theme for this code,
This is not a piece of code and in relation to this mod it exists nowhere apart from inside somebody's head.
this is a link into the admin panel.
Ie admin manage attachments change size.
If you really want to find this then look in manageattachments.php
heaven knows what you are going to do when you find it,,,, have fun!
I agree with a comment above. This is a good mod, but it would be so much better if you could choose which boards get the thumbnails.
Maybe one day
Maybe sounds like forever, it has been months ago since I've asked for that function.
Is there any reason why you are not adding it?
Or would it become a premium version instead?
I would buy it!
No time to add it been focusing on other projects. Not really extending my mods mostly just doing bug fixes.
Hello,
how I get this working with the Babylon Theme ? I can not place the code without messing up the index :P
Thank you and regards
MessageIndex.template.php
// Are there actually any topics to show?
if (!empty($context['topics']))
{
echo '
<td width="9%" colspan="2"></td>
<td><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=subject', $context['sort_by'] == 'subject' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt[70], $context['sort_by'] == 'subject' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a></td>
<td width="14%"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=starter', $context['sort_by'] == 'starter' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt[109], $context['sort_by'] == 'starter' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a></td>
<td width="4%" align="center"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=replies', $context['sort_by'] == 'replies' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt[110], $context['sort_by'] == 'replies' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a></td>
<td width="4%" align="center"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=views', $context['sort_by'] == 'views' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt[301], $context['sort_by'] == 'views' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a></td>
<td width="24%"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=last_post', $context['sort_by'] == 'last_post' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt[111], $context['sort_by'] == 'last_post' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a></td>';
// Show a "select all" box for quick moderation?
if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1)
echo '
<td width="24" valign="middle" align="center">
<input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');" class="check" />
</td>';
// If it's on in "image" mode, don't show anything but the column.
elseif (!empty($options['display_quick_mod']))
echo '
<td width="4%" valign="middle" align="center"></td>';
}
// No topics.... just say, "sorry bub".
Thumbnail on Topic Listing - Installation Instructions for 1.1.11
./Themes/default/MessageIndex.template.php
Find: [Select]
<td width="9%" colspan="2" class="catbg3"></td>
Replace With: [Select]
<td width="9%" colspan="', $context['show_thumbnails'] ? 3 : 2, '" class="catbg3"></td>
Find: [Select]
echo '
<tr>
<td class="windowbg2" valign="middle" align="center" width="5%">
<img src="', $settings['images_url'], '/topic/', $topic['class'], '.gif" alt="" />
</td>
<td class="windowbg2" valign="middle" align="center" width="4%">
<img src="', $topic['first_post']['icon_url'], '" alt="" />
</td>
Replace With: [Select]
echo '
<tr>
<td class="windowbg2" valign="middle" align="center" width="5%">
<img src="', $settings['images_url'], '/topic/', $topic['class'], '.gif" alt="" />
</td>
<td class="windowbg2" valign="middle" align="center" width="4%">
<img src="', $topic['first_post']['icon_url'], '" alt="" />
</td>';
// Thumbnail Topic Mod
if ($context['show_thumbnails'])
{
echo '<td class="windowbg2" valign="middle" align="center">';
$imagefound = false;
foreach ($topic['image'] as $image)
{
if ($imagefound == true)
break;
if (isset($image['id']))
{
echo '<a href="', $topic['first_post']['href'], '"><img src="', $image['url'], '" width="', $image['width'], '" height="', $image['height'], '" alt="" /></a>';
$imagefound = true;
}
}
echo '</td>';
}
// End Thumbnail Topic Mod
echo '
Yay I found out how to use it on specific board.
Quote from: improv on August 04, 2010, 11:08:18 AM
Yay I found out how to use it on specific board.
Why not share
Hello,
Firstly, thank you for the great mod, it's just what I needed. But, it is not functional on my custom theme. I have tried using my own substandard CSS scripting abilities and have come about nothing but trouble when trying to alter MessageIndex.template.php (SMF 1.1.11). All I intended for was to edit the Message Icon to display the thumbnail attachment, and have had nothing but strange display issues ???
Thanks in advance to anyone who responds, I attached the file below:
Tried to install this Mod in my SMF1.1.11 using extreme6 theme. Installing is successful but nothing happens. Any idea to modify?
Thanks in Advance.
Are the images showing up?
Quote from: madman71 on October 08, 2010, 03:11:27 PM
Are the images showing up?
No images at all. Its like nothing happens after i install.
Please help.
Go and attach an image to a new post and see if it show up
I just did but still nothing happens.
See if the mod is working under the default theme
I can't do it right now as people are accessing the site. Hoping someone tried this mod on SMF 1.1.11 using extreme6 theme.
go into your profile and you can do it that way. You changing the theme that you use in your profile does not affect your other users.
Its working on default theme. ;)
I thought it will also show on Insert Image on the topic :-[
then you'll need to verify that the code was indeed written to your extreme6 theme files. I suspect that it was not.
http://custom.simplemachines.org/mods/index.php?mod=1151
use the mod parser (link above) to see the edits needed for your theme.
Does your extreme6 theme have a MessageIndex.template.php ? if so, this looks like the only file you need to add the mod code to.
@improv can you share how to enable this mod on specific boards? I would love to have this mod but I don't want it in all the boards.
Quote from: Evilboy23 on October 19, 2010, 11:40:22 AM
@improv can you share how to enable this mod on specific boards? I would love to have this mod but I don't want it in all the boards.
Yes, please share! :)
I installed the mod succesfully and it´s working fine but...
when posting more than one attachment it will always show the image last ---> not showint the image but the standard paperclip.
Any idea why ?
i like this but i prefer not to let my member upload attachments (space and safety issues)
is there any way i can just add a custom field on the post template where they insert a url to an image and it shows on the message index?
That's a possiblitiy but wouldn't be in this mod cause this mod goes off the attachment table.
do you think you can make one like that?
Hi,
I don't think this is working correctly:
Quote!Fixed showing an image if there was another attachment of a different type before it.
On my forums many members upload a .schematic file before their images, and so if they did that, then the image doesn't show up in the index. Also I've seen some threads that have a .zip file attached first and they also don't show the image that is next in the attachment list to display on the index, so I don't think it's a matter of what type of file is first, just if an image is not first then it's not going to show an image in the index list.
Can I find out how to fix this maybe?
Thanks,
SMF 2.0 RC4 default theme
Quote from: City Builder on February 12, 2011, 03:52:33 AM
Hi,
I don't think this is working correctly:
Quote!Fixed showing an image if there was another attachment of a different type before it.
On my forums many members upload a .schematic file before their images, and so if they did that, then the image doesn't show up in the index. Also I've seen some threads that have a .zip file attached first and they also don't show the image that is next in the attachment list to display on the index, so I don't think it's a matter of what type of file is first, just if an image is not first then it's not going to show an image in the index list.
Can I find out how to fix this maybe?
Thanks,
SMF 2.0 RC4 default theme
I am in the same boat and would really love a solution to this prob I would really like to use this mod. I have a theme also Pinst theme
Im guessing since I wrote that nearly a month ago, that there is no more support for this mod.
Haven't had time to look at maybe in a couple months only focused on major issues/problems.
Okay, I figured out how to make this mod board-specific. Here are my changes:
In Themes/default/MessageIndex.template.php, this:
// Thumbnail Topic Mod
if ($context['show_thumbnails'])
should be changed to:
// Thumbnail Topic Mod
if ($context['show_thumbnails'] && @in_array($context['current_board'], $modSettings['photo_boards']))
// Are there actually any topics to show?
if (!empty($context['topics']))
{
echo '
<th scope="col" class="first_th" width="8%" colspan="', $context['show_thumbnails'], $modSettings['photo_boards']) ? 3 : 2, '"> </th>
shoud be changed to:
// Are there actually any topics to show?
if (!empty($context['topics']))
{
echo '
<th scope="col" class="first_th" width="8%" colspan="', $context['show_thumbnails'] && @in_array($context['current_board'], $modSettings['photo_boards']) ? 3 : 2, '"> </th>
In Sources/ManageSettings.php, look for:
// Mod authors, once again, if you have a whole section to add do it AFTER this line, and keep a comma at the end.
and add the following after it:
array('text', 'photo_boards', '30'),
'',
In Themes/default/languages/Modifications.english.php, add this to the bottom:
$txt['photo_boards'] = 'Enable Thumbnails to be shown on specific boards';
You should now have a new setting in Administration Center » Modification Settings » Miscellaneous. Leaving it blank will disable it for all boards.
Hi, exist any way to use this with external urls instead attachments? if not, exist any way to modify the script for that?
I mean something like a "external url field" in post template (only for the topic list thumb) that url is saved to the DB, and after that the script take these url from the DB and show in topic list.
I mean something very simple, basically:
-Add a external image url (thumb) to the database. (no related with topic contents, simply a image url for show as thumb)
-Display these url/image in topic listing.
Would be a great add, i remember the old CMS PHPNuke days, their download module had something similar in add file template, the user had 2 options, one for attach a file and add to the download list, and other for add a external url and use as download link, this would be similar but with images.
excuse my english.
grettings
Thank you for the wonderful mod! I thought I'd let everybody know that when I updated my forum from 2.0 RC5 to 2.0 Gold, I had to reinstall all my mods. This mod installed without issues and without emulation. Hope this info helps someone!
EDIT: Oops... Didn't realize until I viewed the mod download page that this mod was already 2.0 compliant.... and still no way to make it board-specific.... So sad.... :-[
I installed the thumbnail on topic listing through the package installer but it doesnt seem to be working. My forum is located at crafterschat.com. Any ideas how i can get it to work. Thanks :)
Is there any chance that this mod will be modified to become board-specific straight out the box? I posted some info on how to make this mod board-specific a few posts back.....
Quote from: dougiefresh on June 27, 2011, 08:49:22 AM
Is there any chance that this mod will be modified to become board-specific straight out the box? I posted some info on how to make this mod board-specific a few posts back.....
Maybe at some point just don't have any time at the moment so I doubt it.
Would it be okay if I made the modifications to the package and sent it to you? Or I could write a modification for your modification to add that setting to the admin panel's modification settings page.....
Please let me know because this is a feature that would be very nice to have, but not all over the board....
That's fine with me. Just it will take some time since you would need to create an interface for both versions along with some kind of database setting to store it.
Quote from: vbgamer45 on June 27, 2011, 11:11:34 AM
That's fine with me. Just it will take some time since you would need to create an interface for both versions along with some kind of database setting to store it.
I'm sorry.... I won't be able to work with the mod as work is picking up significantly...
Thanks a lot for creating this great mod.
Its working perfectly in all my themes. I like this Thumbnail topic mod more than smf gallery.
Good job brother
Wish you all the best.
Glad you enjoy the mod!
This mod is exactly what I need for my board (dedicated to photography), but I did'nt found the way to reduce thumbnail on topic list. Maybe I missed it in this tread, if you would be kind to help me... it wil be great !
Many thanks !
Quote from: apnart on October 30, 2011, 04:49:10 PM
This mod is exactly what I need for my board (dedicated to photography), but I did'nt found the way to reduce thumbnail on topic list. Maybe I missed it in this tread, if you would be kind to help me... it wil be great !
Many thanks !
In attachments settings, set max width and height of attachments :)
Hello!
Is it possible to change image backgrounds (on topic list)
of sticky and locked topics in corresponding colors?
If it is possible, how can I do that?
Thanks.
Quote from: vbgamer45 on March 15, 2011, 04:54:31 PM
Haven't had time to look at maybe in a couple months only focused on major issues/problems.
Any chance of getting this fixed now? I still get no image for the topics that do NOT have an image as the first attachment and so don't use the mod but really really want to use it, but it just looks too sloppy when some topic rows have an image and some don't.
Would be really great if you can get some time to make this mod pull the first image in the attachments instead of only trying to pull the first attachment to display on the index. Or maybe make it so that if it can't find an image in the first attachment slot, then it gets a generic image of our own choosing and displays that instead. Although it would be preferable for it to pull the first available image attachment instead of giving up and displaying none if an image isn't the first attachment.
Thanks
Got it sorted now great Mod
What if there are multiple attachments, could you limit it to the first one?
Answer: Only the first one!
Excellent modification, my topics look so colourful now ;)
http://biology-forums.com/index.php?board=17.40
In the MessageIndex.template, I would prefer to show all attached images on the thread instead of just one. What's the best way to support this?
Currently doesn't support that. You would have to loop though all the image attachments in the topic and echo each one.
Okay, so is there anybody around that can mod this mod so that it pulls the first image in a list of attachmenents instead of only looking at the first attachment to see if it's an image? Basically have it display the first image that are attached to a topic, instead of not displaying anything if the first attachment on a topic isn't an image?
Thanks
Quote from: City Builder on April 17, 2012, 07:25:26 PM
Okay, so is there anybody around that can mod this mod so that it pulls the first image in a list of attachmenents instead of only looking at the first attachment to see if it's an image? Basically have it display the first image that are attached to a topic, instead of not displaying anything if the first attachment on a topic isn't an image?
Thanks
That's interesting, never knew of this limitation. You could put a notice to all your members so that if someone is uploading a file and they want their image displayed in the message board, then post the image first and all other files after.
Quote from: Liam_michael on April 17, 2012, 09:05:32 PM
Quote from: City Builder on April 17, 2012, 07:25:26 PM
Okay, so is there anybody around that can mod this mod so that it pulls the first image in a list of attachmenents instead of only looking at the first attachment to see if it's an image? Basically have it display the first image that are attached to a topic, instead of not displaying anything if the first attachment on a topic isn't an image?
Thanks
That's interesting, never knew of this limitation. You could put a notice to all your members so that if someone is uploading a file and they want their image displayed in the message board, then post the image first and all other files after.
One of the problems with that is we've already got over 10,000 topics with images and other files attached. The other problem is that when you have over 100,000 members, you find that there is a huge amount of people that can't figure out how to follow instructions, always best to try to fool proof the system to help those that have a hard time following instructions, even something as simple as saying, Upload your images files first, then your other files.
I'd use it the way that it is, but it really just makes the topic indexes look too sloppy with so many missing thumbnail images. I'm not ocd or anything like that but it just drives me batty to see so many missing thumbnail images. Which is why it would also be nice if this mod were to use an image that the admin can choose in the admin settings somewhere that could use a default image for those topics that don't have any images attached. On some of those 10,000 topics there are no images, just other files attached, so while they are not that many, to keep things neat with this mod it would be good to have a default image as well.
Very true, then do what I've done:
http://biology-forums.com/index.php?board=17.0
When there is no image uploaded, it gives the original icon.
Quote from: Liam_michael on April 17, 2012, 09:34:50 PM
Very true, then do what I've done:
http://biology-forums.com/index.php?board=17.0
When there is no image uploaded, it gives the original icon.
Good idea put it done as feature request.
Quote from: Liam_michael on April 17, 2012, 09:34:50 PM
Very true, then do what I've done:
http://biology-forums.com/index.php?board=17.0
When there is no image uploaded, it gives the original icon.
The thing is that it works well on your forum as your image icons are not much larger than the forums icons, so it looks right at home, but we need to have image icons that people can at least get an idea for what the image is else theres no point to having the image there at all. I was trying to have images on the index to be about the same size as the users avatars which I think at the time that I was trying to get this to work were about 100x100 or 150x150
Quote from: City Builder on May 12, 2012, 12:12:10 PM
Quote from: Liam_michael on April 17, 2012, 09:34:50 PM
Very true, then do what I've done:
http://biology-forums.com/index.php?board=17.0
When there is no image uploaded, it gives the original icon.
The thing is that it works well on your forum as your image icons are not much larger than the forums icons, so it looks right at home, but we need to have image icons that people can at least get an idea for what the image is else theres no point to having the image there at all. I was trying to have images on the index to be about the same size as the users avatars which I think at the time that I was trying to get this to work were about 100x100 or 150x150
Then what you could do it have a tooltip where if a member moves the mouse over the image, it enlarges it in a popup.
I am experiencing an odd occurrence with this mod... First off, let me say... I love it... it is essential for my forum.
Here's my problem...
I run a website featuring cheerleaders, and squad rosters. I want the group photo 1st to become the topic thumbnail, I then post all the individual cheerleaders afterwards. When I have to finish the post, the thumbnail changes from the group photo to one of the individual photos.
Link to thumbnail : http://www.myfavoritecheerleader.com/index.php?board=179.0
Is there a way to keep it the first file regardless of the number of attachments or modifications to the starting topic?
Thanks,
-Steve
My space and bandwidth are severely limited...is there a way to take the first linked image and show this instead of an attachment?
Quote from: ladyengland on April 16, 2013, 03:25:43 AM
My space and bandwidth are severely limited...is there a way to take the first linked image and show this instead of an attachment?
Not at the moment.
Would be possible to show the thumnails on boardindex instead on topic listing?
Not built into the mod.
Quote from: vbgamer45 on April 26, 2013, 11:23:38 AM
Not built into the mod.
That's why I asked "Would be possible"!
Sure it can be done but would need to be coded.
Quote from: vbgamer45 on April 26, 2013, 06:50:58 PM
Sure it can be done but would need to be coded.
If you code this and sell it as a paid mod, I will buy it. Others should be interested too.
Regards
I installed a new 2.0.4 and install the latest version of this mod but no images are showing up. I checked the files manually and all the changes have been made. Any ideas?
Do you have an extra column in your boards where the image would be?
Quote from: vbgamer45 on May 20, 2013, 05:59:21 PM
Do you have an extra column in your boards where the image would be?
No. It seems to me the column was never created.
And your topics do have an image attachment in the first post?
Thanks gamer... seems to me there was a gremlin in the works. Fine now!
Glad you have it working!
It doesn't always choose the first attachment. How can I change this? It's vital.
Thanks!
It is maybe a good idea, to make a "per-Board"-setting...
I have thought about it per board. Someone did make an edit so it only shows on some boards and not others.
Quote from: vbgamer45 on June 27, 2011, 11:11:34 AM
Quote from: dougiefresh on June 27, 2011, 11:07:32 AM
Would it be okay if I made the modifications to the package and sent it to you? Or I could write a modification for your modification to add that setting to the admin panel's modification settings page.....
Please let me know because this is a feature that would be very nice to have, but not all over the board....
That's fine with me. Just it will take some time since you would need to create an interface for both versions along with some kind of database setting to store it.
I know it's been a few years, but I finally decided to sit down and write a user interface for both SMF 2.0 and SMF 1.1 for this mod.... Please note that this is pretty much just a checkbox on the admin screen where you modify the board. It took me about a day to write. So I thought I'd share my little bit of work with you and the world....
@vbgamer45: Thanks again for this wonderful mod. Please feel free to use my modifications and/or screenshots as you see fit.... (I dubbed this version 2.0.... Hope that's okay!) I hope this is helpful....
EDIT: Please note I checked to make sure the code worked on a clean copy of SMF v2.0.6 and v1.1.19. I haven't checked older versions....
Nice!
Version 2.0 Released!!!
Big thanks to dougiefresh for this update!
+Adds an interface in the manage boards area to checkbox if the board has the thumbnail topic system enabled for it or not.
I forgot to modify the Thumbnail.xml, Thumbnail2.xml and Thumbnail2rc2.xml files to make the same changes as I did to Thumbnail2rc4.xml..... I realized this earlier today.... Tomorrow, I'll fix this issue. I apologize about this.
I downloaded the new mod from the customization site, just to make sure that it was the same as the one I had (mostly because I screwed up my copy ::) ). It wasn't, as my changes to the Thumbnail files weren't present..... :o So I added in the changes necessary to make it board-specific . I apologize about this.
Version 2.1
!Fixed a BIG bug where the new photo_boards array was always ignored.
+Some speed-related changes to keep from searching the photo_boards array multiple times
+Added max width/height settings to the Modifications Settings area as suggested here (http://www.simplemachines.org/community/index.php?topic=232539.msg1680633#msg1680633) (SMF 2.0 Only)
+Modified code to produce a "no picture" image as suggested here (http://www.simplemachines.org/community/index.php?topic=232539.msg2210634#msg2210634) (SMF 2.0 Only)
+Added support for the Core theme as suggested here (http://www.simplemachines.org/community/index.php?topic=232539.msg2435536#msg2435536)
@vbgamer45: I would like to suggest changing the topic and/or mod name to something like "Thumbnail on Topic Listing (SMF 2.0 and Per-Board Support Added!)".... Would get more hits from those people that think this mod has no per-board support in it.... Just a thought.... 8)
Nice mod - I'm trying out on my beta forum at present. The alternate image setting was awesome, thanks. However the size limits don't function as I expect.
If I have put in
Width: 150
Height: 90
I expect the image to be no wider than 150 and also no taller than 90. This is how the size limits on SMF thumbnails work.
Example: I have a thumbnail 300 x 108 in topic first post.
I get, in the website code:
<img src="blahblah" width="218" height="90" alt="">
This is actually wider than my setting of 150 and so makes the thumbnails look ragged and unattractive.
I would expect, given the settings input above, that the image would be shown as 150 x 54 (smaller than limit size in both axes).
Thanks for the mod, hope this is constructive feedback ;)
In fact, I just put my attachment size to 300 x 300, left mod limits at 150 and 90, and I'm getting
<img src="blahblah" width="300" height="196" alt="">
300 x 196 is the full size of the attachment. So it seems to not be resizing correctly at all.
Quote from: dougiefresh on October 25, 2013, 07:25:50 PM
Quote from: vbgamer45 on June 27, 2011, 11:11:34 AM
Quote from: dougiefresh on June 27, 2011, 11:07:32 AM
Would it be okay if I made the modifications to the package and sent it to you? Or I could write a modification for your modification to add that setting to the admin panel's modification settings page.....
Please let me know because this is a feature that would be very nice to have, but not all over the board....
That's fine with me. Just it will take some time since you would need to create an interface for both versions along with some kind of database setting to store it.
I know it's been a few years, but I finally decided to sit down and write a user interface for both SMF 2.0 and SMF 1.1 for this mod.... Please note that this is pretty much just a checkbox on the admin screen where you modify the board. It took me about a day to write. So I thought I'd share my little bit of work with you and the world....
@vbgamer45: Thanks again for this wonderful mod. Please feel free to use my modifications and/or screenshots as you see fit.... (I dubbed this version 2.0.... Hope that's okay!) I hope this is helpful....
EDIT: Please note I checked to make sure the code worked on a clean copy of SMF v2.0.6 and v1.1.19. I haven't checked older versions....
dougiefresh, I'm on 2.0.6 and have installed the mod. I have used the checkbox on some boards but not others, but the settings seems to be ignored and all boards are displaying thumbnails. Any thoughts?
Is there any way (manually or otherwise) to fix the background of the sticky topics where it's broken by the extra table cell?
Is there a way to link the thumbnail directly to the image instead of the thread?
Would it also be possible to add the img tag to the thumbnail so that fancybox would work on the thumbnails?
fancybox (http://custom.simplemachines.org/mods/index.php?mod=3303)
Hi guy's
Could this be made to pull images from imagehost's as well? what i mean is i have postimage.org as my images host, can it be made to pull the first image of the post as topic pic?
It could be but currently does not.
would be good if you could vbgamer
No time maybe paid job.
How do I prevent a broken image from showing up if I've uploaded an SWF file?
i could not install this mod, it says
Error in Package Installation
3. Execute Modification ./index.php Test failed
1. Replace ./index.php Test failed
please who can assist me to install it
thanks
In my forum, swf files are permitted for upload. This shows as a broken image in the board. What should I do to correct this?
Found a solution:
Change
elseif ($row['bigId'] != 0 && $row['bigWidth'] > 0 && $row['bigHeight'] > 0)
To
elseif ($row['bigId'] != 0 && $row['bigWidth'] > 0 && $row['bigHeight'] > 0 && strpos($row['thnFilename'],'swf') !== false)
Quote from: Tanks on November 11, 2009, 10:24:11 AM
I was wondering if there was any way to have this work for show posts since last visit ?
(/index.php?action=unread)
I second this, I'd like to make it work on that page too.
Everything else, great mod :) I'd pay for it too!
Can anyone install this cool mod for me and the fee
thanks
https://www.youtube.com/watch?v=Xsqrrg6wuZA
it's very easy to install a mod on SMF, you can do it by yourself. The mod is working fine with the latest version of SMF.
i got Error in Package Installation when i tried to install it. what can i do
3. Execute Modification ./index.php Test failed
1. Replace ./index.php Test failed
Thank you very much for this mod ! :D
I strongly appreciate it, especially because I'm running a photography forum ! It is a great addition to the forum !
Glad you enjoyt it!
Quote from: vbgamer45 on March 24, 2014, 04:22:38 PM
No time maybe paid job.
Are talking about adding the "[img]" feature Vbgamer ?
Yeah but at the moment I am extremely busy.
Quote from: vbgamer45 on August 07, 2014, 02:23:54 PM
Yeah but at the moment I am extremely busy.
Please let me know when you think you'll have time. I'm interested by this addition.
@SMFHacks.com Team: If you are interested, I'd be willing to maintain this mod for/with you.
Quote from: dougiefresh on August 11, 2014, 07:28:43 PM
@SMFHacks.com Team: If you are interested, I'd be willing to maintain this mod for/with you.
I generally like to keep mods just since used for traffic purposes.
The image size too big just as posted not thumbnail.
can anyone help
thanks
I love this mod, but for some reason, even then the box is unchecked for a forum, the thumbnail still shows. Also, it won't work on child boards, just the main ones. :(
I'm sorry,my Englisg is not good but I try to explain.
I need help and suggestion.
I used SMF2.0.9 and download package of Thumbnail on Topic Listing's mod but index.php was fail.(I used mod of Pretty url before the Thumbnail on Topic Listing )
And I try to mod by manual that follow a guideline http://custom.simplemachines.org/mods/index.php?action=parse (http://custom.simplemachines.org/mods/index.php?action=parse).
But the index page not run, it's blank page.
Please help to see my code in index.php, how to edit it to correct?
$context = array('pretty' => array(
'action_array' => unserialize($modSettings['pretty_action_array']),
'board_urls' => unserialize($modSettings['pretty_board_urls']),
$context['photo_boards'] = isset($modSettings['photo_boards']) ? explode(',', $modSettings['photo_boards']) : array();
Change to
$context = array('pretty' => array(
'action_array' => unserialize($modSettings['pretty_action_array']),
'board_urls' => unserialize($modSettings['pretty_board_urls'])
);
$context['photo_boards'] = isset($modSettings['photo_boards']) ? explode(',', $modSettings['photo_boards']) : array();
Quote from: vbgamer45 on October 29, 2014, 09:45:17 AM
Change to
$context = array('pretty' => array(
'action_array' => unserialize($modSettings['pretty_action_array']),
'board_urls' => unserialize($modSettings['pretty_board_urls'])
);
$context['photo_boards'] = isset($modSettings['photo_boards']) ? explode(',', $modSettings['photo_boards']) : array();
Thank you vey much.
:) :) :)
Glad to help
hi, is there any way to modify this mod to use the first [ img ] [ /img ] instead of the attachment?
thanks
Not at the moment.
ok....well i needed it, im using createpost to add posts to my forum.... and i dont know how to add attachments.... (i have read createttachment() but that is not working.... i will wait them to modify to use an img instead of attachment...
Img part is somewhat tough...Since you have the scan the post for all the image tags which is harder/slower than attachments since attachments can easily be linked.
a quick solution is to download the image (via script) and autoattach it to the newly created post automatically... do yo know how to attach via script a local file on the srrver?
That would still require fudging $_FILES and is still not possible with createAttachment because it would fail PHP security checks.
Quote from: Arantor on December 18, 2014, 09:31:23 AM
That would still require fudging $_FILES and is still not possible with createAttachment because it would fail PHP security checks.
ok... then I will wait for them to write the functionality to find the first image of the post ....
Quote from: tdguchi on December 17, 2014, 01:49:54 PM
hi, is there any way to modify this mod to use the first [ img ] [ /img ] instead of the attachment?
thanks
That seems to be one of the most requested features to add to this mod, and something I would really like to see added as well.
@vbgamer45, I would be happy to pay for this addition to the mod. Please feel free to pm me with costs if this is something you would be willing to do.
The issue with this is much slower to process. I would have to scan the post for the image. Or when the post is created add the image into a table.
When you say much slower to process, are you referring to it becoming more resource heavy when pages are loaded? Maybe an option to enable or disable this feature for those that wouldn't want to use the extra resources and would be happy with just thumbnails?
I know this has been done and there are mods for this on vbulletin, xenforo and even phpbb. ( it shows the first pic in a topic on forum index, no matter if it's an img or attachment )
If you did have some time and were able to accept an offer for me to pay you to add this; maybe you could look at the coding for any of those mods to see how they were able to accomplish this, and if there was an easier way?
Yes when ever the message index is loaded. I would have to grab the first post from the database. Search it for the first image tag extract that tag then place it on the message index quick and dirty I can do that for $75
That'll work. Can I pm you about specifics and such?
Sure.
Quote from: br360 on January 29, 2015, 02:03:58 AMThat seems to be one of the most requested features to add to this mod, and something I would really like to see added as well. @vbgamer45, I would be happy to pay for this addition to the mod. Please feel free to pm me with costs if this is something you would be willing to do.
Maybe I've misunderstood this (I'm new here, sorry), but if it's for public offering I'd happy to chip in half as I'm in the long winded process of thrashing out a photography forum and, well, this could be rather nice... could it be a function that looks at the post and either posts the first image (if there's one) or if there's an attached image, post that thumbnail instead?
Just an addendum to this, and my offer still stands vbgamer45 :) Something I'm starting to learn as I play around with SMF is that the order of installing mods makes a difference. I couldn't for the life of me get this to work on my 5th testsmf install. But I now realise that some of the other mods had changed something that this mod looks for to pass its tests. On this install I stuck to much simpler mods and this installed just fine. Thanks again vbgamer45
At this time I am very busy with other projects not looking to take on any other work.
Can I ask - is the thumbnail retrieved from a saved copy, or is it regenerated each time?
Thanks
If it is remote it is fetched each time.
Thanks VB. Sorry I should have been more specific. For attachments - they're local, so presumably it's a stored thumb somewhere right?
Yeah I belive so
Ta, thought so. Btw very easy to make thumbs here, and just here, smaller. I added a non-existent class into the img tag, and added max-width css against that class.
Also fwiw, this will need a little tweak for use with responsive curve. RC looks for "<th scope="col" class="first_th" width="8%" colspan="2"> </th>" but I think it's this mod that added the switch and replaced it with "<th scope="col" class="first_th" width="8%" colspan="', $context['show_thumbnails'] ? 3 : 2, '"> </th>" -- also beyond that since there's now an extra column, the colspan css that hides stuff with responsive is a bit out. I'm sure you'll see when you get to it :)
I was thinking that a nice way to have this for images added using [img] without any performance hit might be to use an image proxy like this post - http://www.simplemachines.org/community/index.php?topic=527996.0
One of the parameters you can input is width - so if you added the thumbnail width size as the parameter that'd get a nice quick thumbnail without any processing on the forum server's end. Of yourse you still have to look through that first post, find first image and then create the url for the thumbnail version to post on the topic listing. If anyone has any snippets that look through the first topics like this does, that I could adapt to mod my mod, that'd be very cute...
-Johan
Ok when i try to install this I get the following
QuoteExpression #18 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'fac-forum.att.id_attach' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
This I think is because I am running mysql 5.7
Any advice?
Not sure
try disabling only_full_group_by in MySQL?
Hmm I am not very clever with mysql, in fact stupid would be a great word to use,
so I did this
SET sql_mode = ''
And i still got the same results?
I don't know as well this is something new I would check out some mysql forums or sites and post a topic on that.
Well I went on the oracle forums and after 12 posts arguing between themselves on what I should do, I gave up. lol
I truly thought that after 18 months 5.7 would be out by now. Anyway I decided to install 5.6.23 as well as my 5.7 dev and uploaded the db after some twiddling it worked
Thanks!!!
Glad you have it working now!
Is it possible for the thumbnail to show not the first, but the last/newest attached image?
Not currently you would need to modify the sql statement.
If you can tell me what to change, I will do it - but I suppose it is not as easy as replace ASC to DESC. :(
Hello,
I am having no luck disabling the thumbnail on certain/any boards. When inspecting the new setting it is unchecked for all boards yet displays on all the boards. I tried checking one, saving it, no luck. Then un-checking it and got the same results, thumbnails no matter what.
I am using version 2 of this mod which installed cleanly on SMF 2.0.11.
Thanks a lot for your time.
Can you attach your sources/messageindex.php file.
Sure, here you go.
Attached
messageindex
Thanks vbgamer45.
OK, I replaced my MessageIndex.php file with your version, it removed all of the thumbnails from the topics, yet did not allow turning them back on. Same problem I had before (no control of which boards use the mod) but this time with them all not displaying thumbnails instead of displaying them. Any other ideas?
Thanks for your help.
Attached updated file.
Wow, if I knew this existed before, lol.
Just got finished finalizing my source and theme edits and came on SMF to see the recent topics and seen this.
Mines a little different first I started off with Aeva images, then I had to keep going as you can see.
// Thumbnails
if (preg_match('[smg id=([0-9]+)(.*)]', $row['first_body'], $match)) {
$row['aeva_thumb'] = $scripturl . '?action=media;sa=media;in='.$match[1].';thumb';
} else if (!empty($row['id_thumb']) && $row['id_thumb'] != 0) {
$row['aeva_thumb'] = $scripturl . '?action=dlattach;topic='.$row['id_topic'].';attach='.$row['id_thumb'].';image';
} else if (preg_match('#\[img(.*)\](.*)\[\/img\]#Ui', $row['first_body'], $match)) {
$row['aeva_thumb'] = $match[2];
} else if (!empty($row['filename'])) {
$row['aeva_thumb'] = $modSettings['custom_avatar_url'] . '/' . $row['filename'];
} else if (!empty($row['avatar'])) {
$row['aeva_thumb'] = $row['avatar'] = 'gravatar' ? get_gravatar($row['email_address']) : $row['avatar'];
}
First load Aeva, if none then load attachment thumb, if none then load first image in the post, if none then load gravatar, if none then just fall through to the user avatar. Then in the template if nothing back then just display the generic board icon.
Quote from: vbgamer45 on October 07, 2015, 02:58:28 PM
Attached updated file.
That did it! Thanks.
I am going to update my copy of the mod now.
I really appreciate your help. Kudos.
Looks good nend what site do you use it on?
On a old site I started fresh again.
Here is one of the boards.
http://www.sicomm.us/photography/
Wow that is amazing you really did customize it. I can't even tell it is SMF based. Well that shows you the power of the SMF core. I myself use it for whole websites I make or parts.
Hello again vbgamer,
I reinstalled your new update to this mod (October 7th update) and love how it now grabs images that are not attached, but the images are all huge (ones not attached) and are breaking the layout of the forum. Is there an option to limit the size of these images on the topic listing?
Thanks,
Yahmez
There is no setting for that
There actually is a setting for this, I just found it in mod settings.
Thank you SO MUCH for this mod!! It's absolutely fantastic! :D
Glad you enjoy it.
Parsing Problems with Version 1.2 of this mod.
I want to uninstall version 1.2 of this mod so that I can install the latest version. I get errors with running uninstall so I tried parsing the mod to do a manual removal.
When I try parsing it I get lots of errors like this:
Warning: SimpleXMLElement::__construct(): Entity: line 34: parser error : Opening and ending tag mismatch: file line 7 and operation in C:\inetpub\wwwroot\smfhacks\packageparser\package.php on line 1200
Warning: SimpleXMLElement::__construct(): </operation> in C:\inetpub\wwwroot\smfhacks\packageparser\package.php on line 1200
Warning: SimpleXMLElement::__construct(): ^ in C:\inetpub\wwwroot\smfhacks\packageparser\package.php on line 1200
and no details of the file edits appear.
I attach the version I am trying to parse. Can anyone advise me on how to parse this old version of the mod?
Thank you.
When you see the errors in the uninstall screen, there will be a little pencil icon next to each edit... click the icon for the sections that have errors in the auto-process... fix those and then finish the package manager uninstall to get the rest.
Also assemblytube that is a very old version. Check out the latest one is version 3.0.
Thanks for the tip Kindred. I didn't realise you could do that.
Thanks for the feedback vbgamer45. I was intending to use the latest version of the mod but I could not uninstall the old version due to not being able to parse the code of the old mod to carry out the manual edits needed. If I can do the uninstall I will use the new version. Thanks.
The edits should be nearly the same check new version for the parse instructions.
Thank you. Will give it a go.
How does the new version differ from the old?
List of changes from all versions
Version 3.0
+Added support for img tags inside the first forum post for SMF 2.0 thanks to br360
Setting to control height width found under Modification Settings. Use zero in both values to disable it.
!Fixed board level permissions to hide thumbnails
Version 2.0
Big thanks to dougiefresh for this update.
+Adds an interface in the manage boards area to checkbox if the board has the thumbnail topic system enabled for it or not.
Version 1.1.1
!Fixed a bug with multiple attachments in a post not showing all topics in a forum
Version 1.1
!Fixed showing an image if there was another attachment of a different type before it.
!Also fixed issue with posts disappearing.
Version 1.0 Intial Release
Wow I have the worst timing. I just edited this mod significantly to make it more gallery like on my forum.
What do you mean by posts disappearing?
Did you make any changes to the message index? Can I just overwrite the existing files with what's in the zip?
Yeah I think there are edits to the message index.
Dammet. I definitely have the worst timing ever XD.
Is there an easy way for me to do some sort of compare so I can manually update it? If not I will just have to compare the files in the mod individually and see how I fare that way lol.
Beyond compare is a tool that I use to find file differences works great.
Thanks VB! Appreciate the update too :D.
Did you upload the new version here?
Last Modified:
10:07 am Thursday, October 8, 2015
Latest Version:
2.0
Reuploaded just in case. I think i just forgot to update version number
Version 3.0
+Added support for img tags inside the first forum post for SMF 2.0 thanks to br360
Setting to control height width found under Modification Settings. Use zero in both values to disable it.
!Fixed board level permissions to hide thumbnails
Quote from: Blue-Suit on May 17, 2015, 11:06:12 AM
Ok when i try to install this I get the following
QuoteExpression #18 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'fac-forum.att.id_attach' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
This I think is because I am running mysql 5.7
Any advice?
I know this is a little late to the game, but this was the right question and the next post had the right answer by vbgamer (http://www.simplemachines.org/community/index.php?topic=232539.msg3812722#msg3812722). Good job sir
I ran into the same situation today on my Mac 10.11 (El Capitan) and this is the complete solution
Since newer mysql and simple machine forum... errors on some queries with
QuoteExpression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'smf_gym.pm.id_pm' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
I logged into mysql command line:
mysql> [b]SHOW VARIABLES like '%sql_mode%';[/b]
+---------------+-------------------------------------------------------------------------------------------------------------------------------------------+
| Variable_name | Value |
+---------------+-------------------------------------------------------------------------------------------------------------------------------------------+
| sql_mode | ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
+---------------+-------------------------------------------------------------------------------------------------------------------------------------------+
So, to remove ONLY_FULL_GROUP_BY, I used the commands:
mysql>
set global sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';mysql>
set session sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';mysql> exit;
and it works. Hope someone running into the same scenario as I did and found it in this thread, find the complete answer here now.
So I found a couple of bugs...I would really appreciate some love on this one so I can get it working! :D
1. When I create a new board and tick the thumbnail box it doesn't save the checkbox. It ONLY saves it if I am modifying a board. Does that make sense?
2. If I have a board with no attached images, only images in the topic it won't work no matter what. If I move a topic in there with an attached image it shows all the others right away. You can see that here:
http://www.colormeforum.com/color-me-palettes/ (thumbnails are on, but no attached images means it's not showing anything). Since stickying a topic with an attached image on it to get the thumbs to display would only show the first pages thumbs and look really messy I would love so much if you could look into this :D.
I'm using 3.0 on 2.0.11 :).
Fixed one of the two issues
Version 3.0.1
!Fixed bug SMF 2.0.x not saving new board thumbnail topic settings
Thank you!
Is the other one an easy fix or is there anything I can do to help?
Second doesn't seem to be easy to fix.
I installed the mod on the MinDI theme but cant find the manual edit for $context = array(); in the messageindeex template any help appreciated.
Thanks in advance
That edit is found in the index.php in the root of your forum.
Quote from: vbgamer45 on June 03, 2016, 06:16:40 AM
Second doesn't seem to be easy to fix.
I don't understand it myself but someone I have been working with says that the logic is off...it's searching for attachments and then running the script....so maybe just make it run the script if it's turned on in the board and also has the box checked for using the image in the first post? :D
So for an image to be displayed you've to attach an image to the post is that right?
Quote from: JF3000 on June 15, 2016, 04:27:13 AM
So for an image to be displayed you've to attach an image to the post is that right?
Yes in the first post of the topic.
Or a linked image
Quote from: vbgamer45 on June 15, 2016, 09:21:19 AM
Quote from: JF3000 on June 15, 2016, 04:27:13 AM
So for an image to be displayed you've to attach an image to the post is that right?
Yes in the first post of the topic.
Or a linked image
But it will only display a linked image if there's one attached image post in the board you're looking at.
Well I tried a linked image and nothing showed up. Seems redudent showing an image if one is attached. If attachments are disabled this mod doesn't work at all.
Thanks VBGamer got it working kind of. It shows the thumbs now but its a skews the template of the forum a bit and the section where the thumb is massive and compress the rest and they no longer line up i will attach a sample. Any help appreciated.
Quote from: JF3000 on June 16, 2016, 03:07:59 AM
Well I tried a linked image and nothing showed up. Seems redudent showing an image if one is attached. If attachments are disabled this mod doesn't work at all.
Yeah you have to have an uploaded image in the board to show them.
Another bug....if the image isn't the first thing you attach it wont show no matter what :(.
if i won't show picture from attachment.
but use from Photo Sharing Websites.
how to modify code.
i see this web
http://aqua.c1ub.net/forum/index.php?board=5.0
can do.
plese
If one is found over the other it would use that instead.
ohh Thankyou. :D
i'm not observe.
this mod so cool.
Can an edit be made to this mod so that it creates a thumbnail based on any images within the first post instead of adding an attachment?
So if you add an image in the [img][/img]
tags or any image file via attachment, it crops it and places it in the thumbnail section. If no image exists in the topic at creation, it uses the default image icons (or default thumbnail etc.).
Could that adjustment be made?
I think someone did that before check all topics of this page.
Quote from: vbgamer45 on August 07, 2017, 11:04:55 AM
I think someone did that before check all topics of this page.
There are issues in my MessageIndex.template.php after install:
Database Error
Expression #31 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'assembly.big.id_attach' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
File: /var/www/vhosts/cajican.org/httpdocs/Sources/MessageIndex.php
Line: 464
Here is the aforementioned line (and 5 lines below/above it):
echo '
<script type="text/javascript"><!-- // --><![CDATA[
if (typeof(window.XMLHttpRequest) != "undefined")
aJumpTo[aJumpTo.length] = new JumpTo({
sContainerId: "message_index_jump_to",
sJumpToTemplate: "<label class=\"smalltext\" for=\"%select_id%\">', $context['jump_to']['label'], ':<" + "/label> %dropdown_list%",
iCurBoardId: ', $context['current_board'], ',
iCurBoardChildLevel: ', $context['jump_to']['child_level'], ',
sCurBoardName: "', $context['jump_to']['board_name'], '",
sBoardChildLevelIndicator: "==",
sBoardPrefix: "=> ",
sCatSeparator: "-----------------------------",
sCatPrefix: "",
sGoButtonLabel: "', $txt['quick_mod_go'], '"
});
// ]]></script>
The section I'm referring to is:
sJumpToTemplate: "<label class=\"smalltext\" for=\"%select_id%\">', $context['jump_to']['label'], ':<" + "/label> %dropdown_list%",
You have to change your mysql mode
sql_mode=only_full_group_by
What is it set to by default when SMF makes the database?
EDIT: The answer is this:
sql_mode=ONLY_FULL_GROUP_BY,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
I'm not confident in mysql so I won't alter it until I understand the reason why the mode needs to be changed, just in case it breaks the forum.
I am not certain as well check on google. It shouldn't break anything though
i wont to set display Thumbnail (for each boards) in database
I can not find it. Could you tell me whare is it?
(Usually i will seting in database Because a lots of boards.)
Thank. :D
There is an entry in the smf_setings table
When you modify each board there is an option on that page.
I use a responsive them with divs without tables: https://custom.simplemachines.org/themes/index.php?lemma=2873
Could you help me to add this mod to this theme - I have tried my best, but it seems too hard for me :-[
I am not good at that either. It really would be a per theme edit.
I see, could you at least tell me what is that two replace modifications doing in the theme? The second bigger seems like doing the main picture placement, but what is the first?
I have an issue with this mod (again). Completely different to the last time I tried to install it.
LIMIT ' . ($pre_query ? '' : '{int:start}, ') . '{int:maxindex}',
458: array(
459: 'current_board' => $board,
460: 'current_member' => $user_info['id'],
461: 'topic_list' => $topic_ids,
462: 'is_approved' => 1,
463: 'find_set_topics' => implode(',', $topic_ids),
464: 'topic_prefix' => (isset($_REQUEST['prefix']) ? $_REQUEST['prefix'] : ''),
465: 'clone_topics' => $clone_topics,
466: 'start' => $start,
==>467: 'maxindex' => $maxindex,
Line 467 has an error for some reason.
Whats the error you might have to do a manual install if the code is different.
Quote from: vbgamer45 on August 23, 2017, 09:07:57 AM
Whats the error you might have to do a manual install if the code is different.
Probably will do that at a later date.
I manually installed the mod and it didn't break the forum. That's progress I guess.
However, it doesn't display any images. I don't have attachments on, so the only way this would work is if I have the "[img][/img]" tag version working correctly.
Also, the message index table is borked, so I need to use CSS to fix it, though I haven't seen a new column added where the images are supposed to go.
I did manage to get this working on my forum. The functionality to add thumbnails from [img] tags didn't work, but it does for attachments.
Is there a way to add an NSFW tag to attachments? People like to take liberties on the internet.
There is not. This mod just focuses on attachments and image tags in posts.
I can not see thumbnails on mobile phone, only empty spaces?
How can I fix that?
Thanks.
It should work do you have a responsive mode installed?
Yes, I have responsive mode installed, and there was a little problem with Thumbnail on topic listing package when installed,
I have to change peace of code manually, on: Themes/default/MessageIndex.template.php, maybe I did that wrong?
Before installing mods it looked like:
// Are there actually any topics to show?
if (!empty($context['topics']))
{
echo '
<th scope="col" class="first_th" width="8%" colspan="2"> </th>
now it is:
// Are there actually any topics to show?
if (!empty($context['topics']))
{
echo '
<th scope="col" class="first_th hidden" width="8%" colspan="', $context['show_thumbnails'] ? 3 : 2, '"> </th>
Yeah it's hidden now with that responsive mod.
"hidden" if you take that part out it will appear.
I removed 'hidden' but images did not appear ...
Any other suggestion?
Thanks.
I would also check the td
Which td?
The one with the thumbnail code
I create new test subdomain with new installation (smf-2-0-15) and only two mods: Responsive curve and Thumbnail Topic Mod.
I only removed 'hidden' and did not change anything else, and still do not see thumbnail images on mobile.
I am not programmer, and do not know how to fix this :P ..
Images appeared, later, ... for some reason ::)
please help me
smf version 2.0.15
i cannot find
$context = array();
on index.php then can not replace with
$context = array();
$context['photo_boards'] = isset($modSettings['photo_boards']) ? explode(',', $modSettings['photo_boards']) : array();
Find
// Unserialize the array of pretty board URLs
$context = array('pretty' => array(
'action_array' => unserialize($modSettings['pretty_action_array']),
'board_urls' => unserialize($modSettings['pretty_board_urls']),
'db_count' => 0,
));
Add after
$context['photo_boards'] = isset($modSettings['photo_boards']) ? explode(',', $modSettings['photo_boards']) : array();
vbgamer45
thank you very much for your kindly support
Glad to help.
Error in database when I go to board
Expression #30 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'hdclasic.big.id_attach' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
Archivo: /home/uhdcl/public_html/Sources/MessageIndex.php
Línea: 421
mysql v5.7
^ search other posts in this topic - it's been covered before.
Ok, Itry with this
remove ONLY_FULL_GROUP_BY, I used the commands:
mysql> set global sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
mysql> set session sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
mysql> exit;
but then Forum cant conect to database :-\ :-\
I generally edit it from the my.cnf file or my.ini
Nothing at all, cant connect to database
Undo what you changed
Quote from: vbgamer45 on June 06, 2018, 02:10:50 PM
Undo what you changed
teh same
Expression #30 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'hdclasic.big.id_attach' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
Archivo: /home/uhdcl/public_html/Sources/MessageIndex.php
Línea: 421
well I think new versions of mysql are incompatible with some mods
That is true. I would have to redo the queries to make it work.
Quote from: vbgamer45 on June 06, 2018, 02:19:36 PM
That is true. I would have to redo the queries to make it work.
Thanks !! :) :)
Quote from: mikeymx5 on January 03, 2010, 01:53:14 PM
Any chance on adding the core into your code, I dont like doing manual editing of files and I have no intention of using the crappy curve theme.
its very easy to do.
in themes/core/MessageIndex.template.php
Find
<th width="9%" colspan="2" class="catbg3 headerpadding"> </th>
replace with
<th width="9%" colspan="', $context['show_thumbnails'] ? 3 : 2, '" class="catbg3 headerpadding"> </th>
Find
<td class="', $alternate_class, ' icon2">
<img src="', $topic['first_post']['icon_url'], '" alt="" />
</td>
Replace with
<td class="', $alternate_class, ' icon2">
<img src="', $topic['first_post']['icon_url'], '" alt="" />
</td>';
// Thumbnail Topic Mod
if ($context['show_thumbnails'])
{
echo '<td class="windowbg2" valign="middle" align="center">';
$imagefound = false;
foreach ($topic['image'] as $image)
{
if ($imagefound == true)
break;
if (isset($image['id']))
{
echo '<a href="', $topic['first_post']['href'], '"><img src="', $image['url'], '" width="', $image['width'], '" height="', $image['height'], '" alt="" /></a>';
$imagefound = true;
}
}
echo '</td>';
}
// End Thumbnail Topic Mod
echo '
</td>
Please add this to your install file
Thanks
SOO, I followed this in my custom theme in 2.0.15.. I understood that it may not work since this post is so old and I do not know much about coding- or what has changed in the SMF code over the years.
So, while it
did make the mod work, it made my theme all shotty- a lot of the colors set behind words are gone and this type of thing. Any suggestions?
Here is the original:
<th scope="col" class="first_th" style="width: 8%;" colspan="2"> </th>
Here is my updated bit:
<th scope="col" class="first_th" style="width: 8%;" colspan="', $context['show_thumbnails'] ? 3 : 2, '"> </th>
Here is the original:
<td class="icon1 ', $color_class, '">
<img src="', $settings['images_url'], '/topic/', $topic['class'], '.gif" alt="" />
</td>
<td class="icon2 ', $color_class, '">
<img src="', $topic['first_post']['icon_url'], '" alt="" />
</td>
Here is my updated bit:
<tr>
<td class="icon1 ', $color_class, '">
<img src="', $settings['images_url'], '/topic/', $topic['class'], '.gif" alt="" />
</td>
<td class="icon2 ', $color_class, '">
<img src="', $topic['first_post']['icon_url'], '" alt="" />
</td>';
// Thumbnail Topic Mod
if ($context['show_thumbnails'])
{
echo '<td class="windowbg2" valign="middle" align="center">';
$imagefound = false;
foreach ($topic['image'] as $image)
{
if ($imagefound == true)
break;
if (isset($image['id']))
{
echo '<a href="', $topic['first_post']['href'], '"><img src="', $image['url'], '" width="', $image['width'], '" height="', $image['height'], '" alt="" /></a>';
$imagefound = true;
}
}
echo '</td>';
}
// End Thumbnail Topic Mod
echo '
</td>
Attached below are both of these files as a whole
Looks ok I would change class="windowbg2"
Quote from: vbgamer45 on June 25, 2018, 10:58:15 PM
Looks ok I would change class="windowbg2"
Thanks for your input!!
Do you mean to change class in one of these examples, both of them, throughout the entire file, or...?
I really appreciate it. I'm glad to be learning more on this every day...
Just in your example for echo '<td class="windowbg2" valign="middle" align="center">';
Ok, after messing with that code a bit and nothing changing, I downloaded the original again.. and there was something wrong with it. so it doesn't actually have to do with this code. thank you though.
This mod works great but for some reason this mod works for every board except one? im using smf 2.0.17 I need help
What's the board id? How many boards do you have?
Quote from: vbgamer45 on April 24, 2020, 06:47:13 PM
What's the board id? How many boards do you have?
The board id is 26 and I have 11 boards ( I know its weird but I have made and delete boards in the past). I seemed to have fix it by creating a new board and moving all topics to that board. Then I toggled "thumbnails" on the board modifications and moved all the topics back and it seems to have worked.
However there is a new problem. It works on the first page but not in any pages after that
Update
Version 4.0
!Fixed a case where if you are just using linked images the column for thumbnail topic will not appear
@DreadPirateRoberts I did fix one bug I saw in the mod above.
Note the column only appears if there is an image found in the first post. either attached or linked
Hello there.
I am trying to update this mod so I cannot find these lines in ./Sources/ManageSettings.php to remove before uninstalling 3.0.1 version.
How can I solve this issue?
Code: (Find) [Select]
// Thumbnail Topic Mod: Update the database setting for "photo_boards"
$photo_board = isset($_POST['thumbnail']);
if ($photo_board && !in_array($_POST['boardid'], $context['photo_boards']))
$context['photo_boards'][] = $_POST['boardid'];
else if (!$photo_board && in_array($_POST['boardid'], $context['photo_boards']))
{
foreach ($context['photo_boards'] as $id => $board)
{
if ($_POST['boardid'] == $board)
unset($context['photo_boards'][$id]);
}
}
updateSettings( array( 'photo_boards' => implode(',', $context['photo_boards']) ) );
// Create a new board...
Code: (Replace) [Select]
// Create a new board...
That should be in ManageBoards.php I belive
Oh... but why is it saying that I need to remove those lines from ManageSettings.php instead of ManageBoards.php?
Sorry but I'm little confused. :o ???
(https://i.postimg.cc/MGKGmdKC/Screenshot-48.jpg)
EDIT O:) !Somehow I have managed to uninstall the previous version without removing lines from any file and installed the latest 4.0 version without issues.
Test failed above says for this code
<file name="$sourcedir/ManageSettings.php">
<operation>
<search position="before"><![CDATA[// Mod authors, add any settings UNDER this line. Include a comma at the end of the line and don't remove this statement!!]]></search>
<add><![CDATA[
'',
// Thumbnail Topic Settings
array('int', 'topic_thumb_height'),
array('int', 'topic_thumb_width'),
]]></add>
</operation>
</file>
Hello,
This is a nice mod, is there any chance to be available for 2.1rc2 version?
I am testing a new forum and I was curious about this mod.
Maybe but generally waiting for 2.1 final
Thanks @vbgamer45 for your response too... you are very kind.
I am testing on localhost RC2 for my new forum so suddenly everyone is starting to write about RC3 and here about final version.
My (next) question is simple, can I wait a little bit more for the release of final or RC3 version before going live with my new forum?
Thanks. :)
There has been a good amount of changes since RC2
1311 commits to release-2.1 since this release
Most people we recommend grabing the github release. I would just wait for RC3. Just note changes that you make to forum when goes final will not be carried over you will need to uninstall/reinstall mods etc
Thanks @vbgamer45, this is the link from github to download with the latest changes?
https://github.com/SimpleMachines/SMF2.1
Sorry for the offtopic, you may delete my messages if they are not in proper place.
Yes it is.
I had to reinstall my Forum on a completely new ISP.
I just successfully installed the MessageIndex mod but I don't think I have my Icons folder in the correct place because none of the thumbnails appear.
Right now I have my Icons folder directly under my SMS Folder. Can anyone tell me where I should move it to:
http://www.tseatc.com/smf/index.php
Thank you,
TW
One issue I see is guests don't have permissions to view attachments
So you can't see the images as guest on a forum such as http://www.tseatc.com/smf/index.php/board,25.0.html
OK.. I changed that now to allow guests permission to view attachements.
I'm the Admin.. and I can't see any of the Thumbnails on Topic Listing.
Also, no attachments appear. Only their file name and when you click on it you get 404 - Attachment Not Found
TW
Quote from: vbgamer45 on October 05, 2020, 05:03:29 PM
One issue I see is guests don't have permissions to view attachments
So you can't see the images as guest on a forum such as http://www.tseatc.com/smf/index.php/board,25.0.html
There is something wrong with your attachment setup.
I can't view them on a normal post either http://www.tseatc.com/smf/index.php?action=dlattach;topic=3241.0;attach=17873
From this post http://www.tseatc.com/smf/index.php/topic,3241.0.html
When you moved servers, did you use FileZilla to download the attachments?
No. I used the Coffee Cup Visual Site Designer software to build and their ftp to upload the data. Uploads went to the direct IP address given to me by HostGator. That's why I don't believe everything went into the correct place.
I can use cPanel now to move things around but I'm not exactly sure where the Icons folder goes.
Currently, it is here: public_html/smf/icons
Quote from: Arantor on October 06, 2020, 03:45:55 AM
When you moved servers, did you use FileZilla to download the attachments?
But this mod uses attachments, are you using that icons folder for all attachments to posts?
Yes I am. I have 52 folders. Each folder has 3 png files inside them.
Like I mentioned, everything was previously working fine on my previous ISP.. that all changed when I had to recently change ISP's. Now it's not working at all. No thumbnail on topic listing images appear anymore.
TW
Quote from: Arantor on October 06, 2020, 01:29:01 PM
But this mod uses attachments, are you using that icons folder for all attachments to posts?
Then you're not using this mod, you're using a different mod, this mod loads the first attachment in a topic and uses that as an image...
Sounds to me like you need the cbi mod.
If you moved servers run the repair_settings.php tool
What is repair_settings.php? (https://wiki.simplemachines.org/smf/Repair_settings.php)
sounds like you are actually using this mod
https://custom.simplemachines.org/mods/index.php?mod=511
You are absolutely correct. Unfortunately, it doesn't seem to work with the latest version of 2.0.17
TW
Quote from: Kindred on October 06, 2020, 04:41:31 PM
sounds like you are actually using this mod
https://custom.simplemachines.org/mods/index.php?mod=511
it should work just fine.... I suspect that your images are in the wrong location. Ask in the support thread for that mod.
OK. I'll ask. Thanks.
TW
Quote from: Kindred on October 07, 2020, 09:19:49 AM
it should work just fine.... I suspect that your images are in the wrong location. Ask in the support thread for that mod.
Newbie here when it comes to themes etc.
I am changing forum theme to "Studio."
I no longer have the topic thumbnails showing when installing the new theme.
So I uninstalled Thumbnail Topic mod, and I went to install it again. I get this error message which confuses me. It appears to be the exact same file name that fails and also passes.
Because I do not know what I am doing, I stopped at this point.
Recommendations will be very much appreciated.
It is the new theme that the coding is different. You would need to make that 1st edit to Studio messageindex.template.php
Fixed
Done
THANK YOU !
Glad to help
also any other mods that you have installed you will need to either uninstall and reinstall or use the parse button on the mod's pages and do all the template edits manually to the new theme.
It is a very nice mod. I have been using it for two years on smf2.0.13 but suddenly it doesn't show effect. I tried to chase the check but still the same.
I have put a file from another good working website. But still the same.
I have two attachments. This will be able to see if there are any errors or if there are other related files.
Thanks in advance.
(auto-nkp.com)
Quote from: Auto Man on May 10, 2021, 08:13:39 PM
It is a very nice mod. I have been using it for two years on smf2.0.13 but suddenly it doesn't show effect. I tried to chase the check but still the same.
I have put a file from another good working website. But still the same.
I have two attachments. This will be able to see if there are any errors or if there are other related files.
Thanks in advance.
(auto-nkp.com)
Fixed it...
(http://image.free.in.th/v/2013/is/210612095812.jpg) (http://picture.in.th/id/309d31f53b0c7bb2758410f010b2c81c)
Glad you have it working.
I was trying this mod out but instead of thumbnail sized entries, it actually puts the full size whole image in (whether it's an inline image or a large attachment), as shown below:
The mod also works without checking the box on the Admin > Boards > Modify Boards UNTIL I checked at least one - is that right ?
It's a neat mod if only the images were all the same size - how can I set them to one particular size ?
I figured it out - I had to set it via Admin »Modification Settings »Miscellaneous to:
Thumbnail Topic Height: 23
Thumbnail Topic Width: 22
I suggest that you put this in the mod description as a settings that you will need to review.
Also (again), the Thumbnails check box is inconsistent - it only starts working when at least one board is checked.
I just upgraded to SMF 2.1.1
I really miss this great mod :-[
Many of us will be very happy when you update it for 2.1.1 :D
Its on my to do list at some point. Hoping to make hooks based.
Quote from: AlanDewey on February 18, 2022, 05:16:34 PMI just upgraded to SMF 2.1.1
I really miss this great mod :-[
Many of us will be very happy when you update it for 2.1.1 :D
This is main reason I am still on SMF 2.0.19 !
Hope you guys make this for 2.1.1 :)
Added support for SMF 2.1.x
Quote from: vbgamer45 on July 07, 2022, 05:29:28 PMAdded support for SMF 2.1.x
Hmm, installs without errors on 2.1.2 and then errors on the Messageindex...
Unknown column 'memf.real_name' in 'field list'
Bestand: C:\xampp\htdocs\vanilla\Sources\MessageIndex.php
Regel: 361
Something is not quite right here...
Quote from: @rjen on July 08, 2022, 06:39:12 AMHmm, installs without errors on 2.1.2 and then errors on the Messageindex...
Unknown column 'memf.real_name' in 'field list'
Bestand: C:\xampp\htdocs\vanilla\Sources\MessageIndex.php
Regel: 361
Something is not quite right here...
I could reproduce this as well. To fix it change the whole query starting from line 361 till 397 of the aforementioned file, with the following code:
$result = $smcFunc['db_query']('substring', '
SELECT
t.id_topic, t.num_replies, t.locked, t.num_views, t.is_sticky, t.id_poll, t.id_previous_board,
' . ($user_info['is_guest'] ? '0' : 'COALESCE(lt.id_msg, COALESCE(lmr.id_msg, -1)) + 1') . ' AS new_from,
' . ($enableParticipation ? ' COALESCE(( SELECT 1 FROM {db_prefix}messages AS parti WHERE t.id_topic = parti.id_topic and parti.id_member = {int:current_member} LIMIT 1) , 0) as is_posted_in,
' : '') . '
t.id_last_msg, t.approved, t.unapproved_posts, ml.poster_time AS last_poster_time, t.id_redirect_topic,
ml.id_msg_modified, ml.subject AS last_subject, ml.icon AS last_icon,
ml.poster_name AS last_member_name, ml.id_member AS last_id_member,' . (!empty($settings['avatars_on_indexes']) ? ' meml.avatar, meml.email_address, memf.avatar AS first_member_avatar, memf.email_address AS first_member_mail, COALESCE(af.id_attach, 0) AS first_member_id_attach, af.filename AS first_member_filename, af.attachment_type AS first_member_attach_type, COALESCE(al.id_attach, 0) AS last_member_id_attach, al.filename AS last_member_filename, al.attachment_type AS last_member_attach_type,' : '') . '
COALESCE(meml.real_name, ml.poster_name) AS last_display_name, t.id_first_msg,
mf.poster_time AS first_poster_time, mf.subject AS first_subject, mf.icon AS first_icon,
mf.poster_name AS first_member_name, mf.id_member AS first_id_member,
COALESCE(memf.real_name, mf.poster_name) AS first_display_name, ' . (!empty($modSettings['preview_characters']) ? '
SUBSTRING(ml.body, 1, ' . ($modSettings['preview_characters'] + 256) . ') AS last_body,
SUBSTRING(mf.body, 1, ' . ($modSettings['preview_characters'] + 256) . ') AS first_body,' : '') . 'ml.smileys_enabled AS last_smileys, mf.smileys_enabled AS first_smileys, IFNULL(big.id_attach, 0) AS big_id, big.filename AS big_filename, big.width AS big_width, big.height AS big_height,
IFNULL(thn.id_attach, 0) AS thn_id, thn.filename AS thn_filename, thn.width AS thn_width, thn.height AS thn_height, IFNULL(thn.id_attach, mf.body) AS mainpost, t.id_board
' . (!empty($message_index_selects) ? (', ' . implode(', ', $message_index_selects)) : '') . '
FROM (' . $sort_table . ') as st
JOIN {db_prefix}topics AS t ON (st.id_topic = t.id_topic)
JOIN {db_prefix}messages AS ml ON (ml.id_msg = st.id_last_msg)
JOIN {db_prefix}messages AS mf ON (mf.id_msg = st.id_first_msg)
LEFT JOIN {db_prefix}attachments AS big ON (big.id_msg = mf.id_msg AND big.attachment_type = 0)
LEFT JOIN {db_prefix}attachments AS thn ON (thn.id_attach = big.id_thumb)
LEFT JOIN {db_prefix}members AS meml ON (meml.id_member = ml.id_member)
LEFT JOIN {db_prefix}members AS memf ON (memf.id_member = mf.id_member)' . (!empty($settings['avatars_on_indexes']) ? '
LEFT JOIN {db_prefix}attachments AS af ON (af.id_member = memf.id_member)
LEFT JOIN {db_prefix}attachments AS al ON (al.id_member = meml.id_member)' : '') . '' . ($user_info['is_guest'] ? '' : '
LEFT JOIN {db_prefix}log_topics AS lt ON (lt.id_topic = t.id_topic AND lt.id_member = {int:current_member})
LEFT JOIN {db_prefix}log_mark_read AS lmr ON (lmr.id_board = {int:current_board} AND lmr.id_member = {int:current_member})') . '
' . (!empty($message_index_tables) ? implode("\n\t\t\t\t", $message_index_tables) : '') . '
' . (!empty($message_index_wheres) ? ' WHERE ' . implode("\n\t\t\t\tAND ", $message_index_wheres) : '') . '
GROUP BY t.id_topic, big.id_attach, thn.id_attach, t.num_replies, t.locked, t.num_views, t.is_sticky, t.id_poll, t.id_previous_board, lt.id_msg, lmr.id_msg, t.id_last_msg, t.approved, t.unapproved_posts, ml.poster_time,
t.id_redirect_topic, ml.id_msg_modified, ml.subject, ml.icon, ml.poster_name, ml.id_member, meml.real_name, t.id_first_msg, mf.poster_time, mf.subject, mf.icon, mf.poster_name, mf.id_member, memf.real_name, ml.smileys_enabled,
mf.smileys_enabled, big.filename, big.width, .big.height, thn.filename, thn.width, thn.height, mf.body, id_board
ORDER BY is_sticky' . ($fake_ascending ? '' : ' DESC') . ', ' . $_REQUEST['sort'] . ($ascending ? '' : ' DESC'),
$message_index_parameters
);
Quote from: WarlockWeary on July 02, 2022, 08:25:29 PMThis is main reason I am still on SMF 2.0.19 !
Hope you guys make this for 2.1.1 :)
@vbgamer45 has updated this to work with the 2.1.x branch as well. Now you can upgrade your forum to 2.1.2 :)
Quote from: Doug Heffernan on July 08, 2022, 07:21:07 AMI could reproduce this as well. To fix it change the whole query starting from line 361 till 397 of the aforementioned file, with the following code:
I'll just wait for the mod to be updated ;)
But if it's a mod you like, why wait? :P
Quote from: Steve on July 08, 2022, 10:25:33 AMBut if it's a mod you like, why wait? :P
Because I like it when a mod can be installed and removed without having to make code changes myself
Ah ... I'm the same way, despite what I posted. ;D
Quote from: @rjen on July 08, 2022, 10:45:07 AMBecause I like it when a mod can be installed and removed without having to make code changes myself
That is the best way to go about it imo.
The code I posted was for temporarily use till the new package is officially uploaded.
Fixed. Did the full query change was hoping not to.
Was odd since it worked fine on my test site without that on mysql 5.7
Quote from: vbgamer45 on July 08, 2022, 12:25:33 PMFixed. Did the full query change was hoping not to.
Was odd since it worked fine on my test site without that on mysql 5.7
Beside the error reported by
@@rjen, I got the column this and that isn't in GROUP BY type of error. I think that the reason you could not reproduce it is because the ONLY_FULL_GROUP_BY must be disabled on your mysql config, which makes said issue go unnoticed.
Ah, yeah I was kind of surprised in my testing. was thinking i had to have to all the columns listed in the group by which I still think is strange.
Yep, now it is giving this error... so still not OK..
'smf2.ml.body' isn't in GROUP BY
File: C:\xampp\htdocs\vanilla\Sources\MessageIndex.php
Line: 361
Quote from: @rjen on July 08, 2022, 03:25:07 PMYep, now it is giving this error... so still not OK..
'smf2.ml.body' isn't in GROUP BY
File: C:\xampp\htdocs\vanilla\Sources\MessageIndex.php
Line: 361
I do not get that error on my testing on a brand new forum. Anyways, the thing is that all mods that add to the topic message index by way of queries, all their custom fieldSs) must be added to the GROUP BY clause in the query I posted above.
As it happens, a while ago I got the same issue with another mod that I was testing. What mods do you have that add to the topic message index list if I may ask?
@@rjen check if this version helps
Quote from: vbgamer45 on July 08, 2022, 04:28:37 PM@rjen check if this version helps
That fixes the errors.
But tbh I have some concerns with regard to the thumbnail sizes and margings...
Image are being distorted. I think a height:"auto" would be better... and some margin on the right to separate the text from the images...
Let me know what style to apply and can set a style tag on the images.
Quote from: vbgamer45 on July 08, 2022, 05:54:18 PMLet me know what style to apply and can set a style tag on the images.
Sorry, had a quick look but since I am not planning to use the Mod myself I will leave it up to you...
By the way: there is more that needs attention:
The option to activate the icons in the boards setting is not functional:
Thumbnails:
Display an thumbnail attachment that is attached to the first post of a topic
All boards are showing thumbnails on install, and the option is not set...
Trying to set the option does not work: the setting is not saved...
4.0A
!Fixed in SMF 2.1.x setting to stay checked when enabling thumbnails on a board.
:-(
SMF 2.1.2
from the admin error log....
QuoteDatabase Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.big.height, thn.filename, thn.width, thn.height, mf.body, id_board
ORDER BY ' at line 38
MYSQL80
version 8.0.15
compiled for Win64
Other mods installed:
google analytics 1.6
Image for Anti-Spam Verification Questions 1.2
Simple Audio Video Embedder 6.0.6
After running "uninstall" everything is back to normal.
Your mod worked fantastic with 2.0.18 etc
Posted another update hopefully fixes it
@AlanDewey
Working perfectly now.
THANK YOU !
Ooops.... spoke too soon.
It works perfectly when I am logged in.
When not logged in, people get http 500 errors
error log....
Quotec79435b8e30163aaabf06d4bf38508ae
https://www.ccsforum.com/index.php?board=32.0
C:/inetpub/wwwroot/www.ccsforum.com/Sources/MessageIndex.php (Line 397)
Database Error: Unknown column 'lt.id_msg' in 'group statement'
Uninstall went flawlessly. Forum working fine without the mod.
Fixed that bug and
Version 4.1
!Hide thumbnail column if users don't have permissions to view attachments
Working perfectly now. :) :D ;D :laugh:
Just did some checking on SMF2.1 because the images were getting distorted all the time.
It seems that you have ported some 2.0 behaviour regarding sizes of the images that does not work in 2.1.
First it did not allow me to set all images to a fixed width without setting a fixed height too, causing all images to be disorted.
Then on smaller screens is would always distort images and on mobile the images would be hidden.
Changed this code in MessageIndex.template.php
// Thumbnail Topic Mod
if ($context['show_thumbnails'])
{
global $modSettings;
echo '<div class="lastpost">';
$imagefound = false;
foreach ($topic['image'] as $image)
{
if ($imagefound == true)
break;
if (isset($image['id']))
{
if (empty($modSettings['topic_thumb_width']) || empty($modSettings['topic_thumb_height']))
{
if ($image['bbcimg'] == false)
echo '<a href="', $topic['first_post']['href'], '"><img src="', $image['url'], '" width="', $image['width'], '" height="', $image['height'], '" alt="" /></a>';
else
echo '<a href="', $topic['first_post']['href'], '"><img src="', $image['url'], '" alt="" /></a>';
}
else
{
echo '<a href="', $topic['first_post']['href'], '"><img src="', $image['url'], '" width="', $modSettings['topic_thumb_width'], '" height="', $modSettings['topic_thumb_height'], '" alt="" /></a>';
}
$imagefound = true;
}
}
echo '</div>';
}
// End Thumbnail Topic Mod
To this...
// Thumbnail Topic Mod
if ($context['show_thumbnails'])
{
global $modSettings;
echo '<div style="margin-right:5px;">';
$imagefound = false;
foreach ($topic['image'] as $image)
{
if ($imagefound == true)
break;
if (isset($image['id']))
{
if (empty($modSettings['topic_thumb_width']) && empty($modSettings['topic_thumb_height']))
{
echo '<a href="', $topic['first_post']['href'], '"><img src="', $image['url'], '" alt="" /></a>';
}
if (empty($modSettings['topic_thumb_width']) && !empty($modSettings['topic_thumb_height']))
{
echo '<a href="', $topic['first_post']['href'], '"><img src="', $image['url'], '" height="', $modSettings['topic_thumb_height'], '" alt="" /></a>';
}
if (!empty($modSettings['topic_thumb_width']) && empty($modSettings['topic_thumb_height']))
{
echo '<a href="', $topic['first_post']['href'], '"><img src="', $image['url'], '" width="', $modSettings['topic_thumb_width'], '" alt="" /></a>';
}
else
{
echo '<a href="', $topic['first_post']['href'], '"><img src="', $image['url'], '" width="', $modSettings['topic_thumb_width'], '" height="', $modSettings['topic_thumb_height'], '" alt="" /></a>';
}
$imagefound = true;
}
}
echo '</div>';
}
// End Thumbnail Topic Mod
Now the images will always keep their aspect ratio, unless you specifically set the width AND height in the settings.
Secondly if you want all images to have the same width, only set the width and leave the height 0.
Setting a fixed height works the same way
... the messageindex does not leave empty space on the topics without images
and it also sjhows on mobile...
Posted update with the fix. I am not great with styling/css mainly copy and paste what I see works and use that.
Version 4.2
!Fixes for image distortion and styling for SMF 2.1.X thanks to
@rjen
It's missing some columns in the group by for the attachments.
On any theme even without adding the logic for the avatars, set
$settings['avatars_on_indexes'] = true;
and the mod will fail in the messageindex.
Reported here (https://www.simplemachines.org/community/index.php?topic=583206.msg4132232#msg4132232) by
@rjen I added
af.id_attach and
al.id_attach and it fixed it, not sure if that's it.
Ah ok will take a look
Update
Version 4.2.1
!Group by fixes for SMF 2.1.x
Hello, please tell me how do I make it work in my current theme. It only works in the default SMF theme. My current theme is BootBuff.
You would need to apply the theme edits to your theme. you can find the theme edit instructions on the mod site page.
Quote from: vbgamer45 on October 04, 2022, 11:52:51 AMYou would need to apply the theme edits to your theme. you can find the theme edit instructions on the mod site page.
I'm sorry I don't understand I'm new here. Can you tell me step by step where can I find the "theme edit" and what should I do? And where is the mod site page. I succesfully installed this Thumbnail package but it only shows while I'm in SMF default theme. My current theme is BootBuff (https://www.simplemachines.org/community/index.php?topic=582255.0)
On the packages tab under https://custom.simplemachines.org/index.php?mod=1151
Get the manual install instructions.
Quote from: Rgvill on October 04, 2022, 12:08:40 PMQuote from: vbgamer45 on October 04, 2022, 11:52:51 AMYou would need to apply the theme edits to your theme. you can find the theme edit instructions on the mod site page.
I'm sorry I don't understand I'm new here. Can you tell me step by step where can I find the "theme edit" and what should I do? And where is the mod site page. I succesfully installed this Thumbnail package but it only shows while I'm in SMF default theme. My current theme is BootBuff (https://www.simplemachines.org/community/index.php?topic=582255.0)
Put the mod through the Parser and then apply all the edits displayed manually to your theme.
I still don't get it.
Quote from: Rgvill on October 04, 2022, 12:43:26 PMI still don't get it.
Under Packages tab at the Mod Download section, there is a section just under the mod package that says: Manual installation info and a button that says Parse.
Select your forum version and hit the Parse Button. All manual edits will be displayed then.
Could you just do it for me.
My site
(No worry this is just a test site)
(Please delete this reply when you're done)
You could uninstall the mod, and install it again but mark the other themes during installation.
Quote from: Rgvill on October 04, 2022, 12:57:42 PMCould you just do it for me.
My site
It is better if you do it yourself. Like that you learn on how to take care of things, should the situation repeat itself again in the future.
Anyways, try Diego 's advice above first.
... and we could not do it for you anyway, since we don't have access to edit your files.
1. Execute Modification ./Sources/MessageIndex.php Test successful
* 2. Execute Modification H:\root\home\rgvill-001\www\etcflix/Themes/default/MessageIndex.template.php Test successful
* 3. Execute Modification ./index.php Test successful
* 4. Execute Modification H:\root\home\rgvill-001\www\etcflix/Themes/default/ManageBoards.template.php Test successful
* 5. Execute Modification H:\root\home\rgvill-001\www\etcflix/Themes/default/languages/ManageBoards.english.php Test successful
* 6. Execute Modification H:\root\home\rgvill-001\www\etcflix/Themes/default/languages/Modifications.english.php Test successful
7. Execute Modification H:\root\home\rgvill-001\www\etcflix/Themes/default/languages/Modifications.english-utf8.php Skipping file
* 8. Execute Modification ./Sources/ManageBoards.php Test successful
* 9. Execute Modification ./Sources/ManageSettings.php Test successful
10. Execute Code db2.php
Install in other themes
To use this modification in themes other than the default, the package manager needs to make additional changes to the other themes. If you'd like to install this modification in the other themes, please select these themes below.
BootBuff
Execute Modification ./Themes/BootBuff/MessageIndex.template.php Test failed
1. Replace ./Themes/BootBuff/MessageIndex.template.php Test successful
2. Replace ./Themes/BootBuff/MessageIndex.template.php Test failed
3. Replace ./Themes/BootBuff/MessageIndex.template.php Test failed
Execute Modification ./Themes/BootBuff/ManageBoards.template.php Test successful
1. Replace ./Themes/BootBuff/ManageBoards.template.php Test successful
Wh
Quote from: Diego Andrés on October 04, 2022, 01:24:33 PMYou could uninstall the mod, and install it again but mark the other themes during installation.
It says "At least one error was encountered during a test install of this theme. Are you sure you wish to attempt installation?"
Quote from: Rgvill on October 04, 2022, 07:12:18 PMIt says "At least one error was encountered during a test install of this theme. Are you sure you wish to attempt installation?"
If you click on the little clipboard icon at the left of the line that indicates the error, what does it tell you?
Quote from: Steve on October 04, 2022, 07:17:37 PMQuote from: Rgvill on October 04, 2022, 07:12:18 PMIt says "At least one error was encountered during a test install of this theme. Are you sure you wish to attempt installation?"
If you click on the little clipboard icon at the left of the line that indicates the error, what does it tell you?
I followed Diego's instructions and when I checked the box to apply it to another theme, that's what I get.
(http://www.etcflix.com/error.jpeg)
Before you click 'Install', there should be a line in red that shows you where the test failed. Clicking on the icon I mentioned will tell you what it was expecting to find but didn't.
Ok no line in red no such icon.
What should I do now (I'm sorry if having a hard time understanding everyone, english is not my native tounge) I was trying to get it to work by myself with no luck.
I figured it out. It needs me to add this two codes. But I need help implementing it. What is the correct format? When I added each code it works fine. But when I added them together I got an error.
<div class="board_icon"></div>', $context['show_thumbnails'] ? '<div class="lastpost"></div>' : '', '
<div class="board_icon">
<img src="', $topic['first_post']['icon_url'], '" alt="">
', $topic['is_posted_in'] ? '<span class="main_icons profile_sm"></span>' : '', '
</div>';
// Thumbnail Topic Mod
if ($context['show_thumbnails'])
{
global $modSettings;
echo '<div style="margin-right:5px;">';
$imagefound = false;
foreach ($topic['image'] as $image)
{
if ($imagefound == true)
break;
if (isset($image['id']))
{
if (empty($modSettings['topic_thumb_width']) && empty($modSettings['topic_thumb_height']))
{
echo '<a href="', $topic['first_post']['href'], '"><img src="', $image['url'], '" alt="" /></a>';
}
if (empty($modSettings['topic_thumb_width']) && !empty($modSettings['topic_thumb_height']))
{
echo '<a href="', $topic['first_post']['href'], '"><img src="', $image['url'], '" height="', $modSettings['topic_thumb_height'], '" alt="" /></a>';
}
if (!empty($modSettings['topic_thumb_width']) && empty($modSettings['topic_thumb_height']))
{
echo '<a href="', $topic['first_post']['href'], '"><img src="', $image['url'], '" width="', $modSettings['topic_thumb_width'], '" alt="" /></a>';
}
else
{
echo '<a href="', $topic['first_post']['href'], '"><img src="', $image['url'], '" width="', $modSettings['topic_thumb_width'], '" height="', $modSettings['topic_thumb_height'], '" alt="" /></a>';
}
$imagefound = true;
}
}
echo '</div>';
}
// End Thumbnail Topic Mod
echo '
Quote from: Steve on October 04, 2022, 07:17:37 PMQuote from: Rgvill on October 04, 2022, 07:12:18 PMIt says "At least one error was encountered during a test install of this theme. Are you sure you wish to attempt installation?"
If you click on the little clipboard icon at the left of the line that indicates the error, what does it tell you?
(http://www.etcflix.com/error.jpeg)
2. Replace Error
Code (Find)
// Are there actually any topics to show?
Code (Replace)
// thumbnail topic mod
if (!allowedTo('view_attachments'))
$context['show_thumbnails'] = false;
//end thumbnail topic
// Are there actually any topics to show?
3. Replace Error
Code (Find)
<div class="board_icon">
<img src="', $topic['first_post']['icon_url'], '" alt="">
', $topic['is_posted_in'] ? '<span class="main_icons profile_sm"></span>' : '', '
</div>
Code (Replace)
<div class="board_icon">
<img src="', $topic['first_post']['icon_url'], '" alt="">
', $topic['is_posted_in'] ? '<span class="main_icons profile_sm"></span>' : '', '
</div>';
// Thumbnail Topic Mod
if ($context['show_thumbnails'])
{
global $modSettings;
echo '<div style="margin-right:5px;">';
$imagefound = false;
foreach ($topic['image'] as $image)
{
if ($imagefound == true)
break;
if (isset($image['id']))
{
if (empty($modSettings['topic_thumb_width']) && empty($modSettings['topic_thumb_height']))
{
echo '<a href="', $topic['first_post']['href'], '"><img src="', $image['url'], '" alt="" /></a>';
}
if (empty($modSettings['topic_thumb_width']) && !empty($modSettings['topic_thumb_height']))
{
echo '<a href="', $topic['first_post']['href'], '"><img src="', $image['url'], '" height="', $modSettings['topic_thumb_height'], '" alt="" /></a>';
}
if (!empty($modSettings['topic_thumb_width']) && empty($modSettings['topic_thumb_height']))
{
echo '<a href="', $topic['first_post']['href'], '"><img src="', $image['url'], '" width="', $modSettings['topic_thumb_width'], '" alt="" /></a>';
}
else
{
echo '<a href="', $topic['first_post']['href'], '"><img src="', $image['url'], '" width="', $modSettings['topic_thumb_width'], '" height="', $modSettings['topic_thumb_height'], '" alt="" /></a>';
}
$imagefound = true;
}
}
echo '</div>';
}
// End Thumbnail Topic Mod
echo '
Both code do not exist on Themes/BootBuff/MessageIndex.template.php
This is what inside of Themes/BootBuff/MessageIndex.template.php (http://www.etcflix.com/Themes/BootBuff/MessageIndex.template.txt)
The first one is there but I can't find anything close to the second one. Hopefully the mod author (@SMFHacks.com Team) or someone with more coding skills than I will respond.
Keep in mind that massive amounts of code were removed in MessageIndex.template.php for simplicity's sake in the BootBuff theme, including the code the second error is looking for.
@vbgamer45 - do you have anything to do with this mod?
Quote from: Steve on October 05, 2022, 07:31:02 AMThe first one is there but I can't find anything close to the second one. Hopefully the mod author (@SMFHacks.com Team) or someone with more coding skills than I will respond.
I'm sorry I wasn't right on the first one. This is the error I get.
Code (Find)
<div class="board_icon"></div>
Code (Replace)
<div class="board_icon"></div>', $context['show_thumbnails'] ? '<div class="lastpost"></div>' : '', '
Either way my comment still holds true on the second:
Quote from: Steve on October 05, 2022, 07:31:02 AMKeep in mind that massive amounts of code were removed in MessageIndex.template.php for simplicity's sake in the BootBuff theme, including the code the second error is looking for.
Is it possible to set a default thumbnail for topic that has no image? I want my message index to look even. This is a great mod btw.