Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Mod Requests => Topic started by: Spike2 on December 10, 2006, 01:56:00 PM

Title: Where is this mode?
Post by: Spike2 on December 10, 2006, 01:56:00 PM
Hi,
I whant to know how can i do this in my SMF forum

(http://www.phofan.com/forum/images/thumblist.jpg)

http://www.simplemachines.org/community/index.php?topic=79075.msg528371#msg528371

Any idea?
Thank you very much.

Title: Re: Where is this mode?
Post by: vbgamer45 on December 10, 2006, 02:18:48 PM
That's a custom mod. That is only for that forum. You would need to contact the site owner and see if they can help you.
Title: Re: Where is this mode?
Post by: Spike2 on December 10, 2006, 02:42:25 PM
I have tried to contact the owners of the site many times, but no news up to now ...  > :'(:(

A lot of people need this mod!. Isn't there anyone who can make it??? PLEASE!!!!

Thanks.
Title: Re: Where is this mode?
Post by: Spike2 on December 10, 2006, 03:31:14 PM
What i need to know to make a mod like this!?
Title: Re: Where is this mode?
Post by: Spike2 on December 10, 2006, 04:03:46 PM
SOMEONE HELP ME!!! PLEASE!!!!!!!  >:( :'( :'( :'(
Title: Re: Where is this mode?
Post by: junglecat on December 10, 2006, 05:03:34 PM
Posting multiple topics for this and bumping them several times a day is not going to get you help any faster. It just annoys people.
Title: Re: Where is this mode?
Post by: Spike2 on December 10, 2006, 05:50:08 PM
Quote from: junglecat on December 10, 2006, 05:03:34 PM
Posting multiple topics for this and bumping them several times a day is not going to get you help any faster. It just annoys people.

Ok Sorry :(

But no one responds me :(  :'(

I relly need this mode and if is necesary i whant to lear how to make it
Title: Re: Where is this mode?
Post by: junglecat on December 10, 2006, 05:59:09 PM
Quote from: spike2 on December 10, 2006, 05:50:08 PM
Quote from: junglecat on December 10, 2006, 05:03:34 PM
Posting multiple topics for this and bumping them several times a day is not going to get you help any faster. It just annoys people.

Ok Sorry :(

But no one responds me :(  :'(

I relly need this mode and if is necesary i whant to lear how to make it

You'll just need to be patient. Only a few people might even know how to make that mod, and those people will answer when they are here to answer. It might be a few minutes or a few days before anyone answers. Most people don't know how to do something like that.

Title: Re: Where is this mode?
Post by: Spike2 on December 10, 2006, 06:08:56 PM
Oh ok, Thankyou! :)

I hope that they respond fast :(
Title: Re: Where is this mode?
Post by: Tanks on December 11, 2006, 06:13:42 AM
I tried asking over at Tiny Portal and nobody there has any clue on how to create this...

Maybe the author of the Media Center mod has an idea on how to do this.. he will be very popular if he can create this mod..  8)

I will point him to this topic, because it seems that many forums out there, mine included, needs this mod very badly.  :)
Title: Re: Where is this mode?
Post by: Spike2 on December 15, 2006, 03:43:43 AM
The owner of the site don't responds me  >:(

Anyone have any new?
Title: Re: Where is this mode?
Post by: Spike2 on December 23, 2006, 04:18:08 PM
Look at this, this is what the owners of the site respond me:

"The mod that accomplishes this is coded specifically for PhoFan and is a feature of this forum that we would like to keep unique.

Sorry.."   >:( >:( >:( >:( >:( >:( >:( >:( >:( >:( >:(
http://phofan.com/forum/index.php/topic,613.msg1421.html#msg1421
>:( >:( >:( >:( >:( >:( >:( >:( >:( >:( >:(>:( >:( >:( >:( >:( >:( >:( >:( >:( >:( >:(
Title: Re: Where is this mode?
Post by: Spike2 on December 29, 2006, 07:48:30 PM
is there  some one who can help to create this mod????

Title: Re: Where is this mode?
Post by: niko on January 01, 2007, 05:29:38 AM
I will try to do this it shouldn't be hard.

Edit: Yeah. it wasn't hard.

(http://www.madjoki.com/kuva.png)

It works for attachments, and shows all images from first post. (it needs some work so I wont release this yet)
Title: Re: Where is this mode?
Post by: Spike2 on January 02, 2007, 12:04:53 AM
Well i have really good news !

A programer friend of mine helped me advance with an important part of this issue.

(all the necessary info and files that i have about this are at the end of this post)

Look:

(http://img73.imageshack.us/img73/9470/adjuntosfw3.gif)

But i still have a couple more issues to resolve, and i need some help.

It's possible to attach files but when you desactivate the option of the thumbnails the images appearse in its original size and it looks bad. However with the option thumbnails is activated everthing works fine.
(Personally I don't like the option of SMF of the thumbnails because it generates a thumbnail for each image which takes up more space in the server. And even more when you have many images. I prefer leave this option desactivated)
 
What would be necessary would be that when the thumbnail option is disactivated the images that are attached   could be seen in their original size and that a thumbnail be generated only of the first image. Also that when you go to the topic all the images be large like they are here: http://phofan.com/forum/index.php/topic,488.0.html
or here
http://conceptart.org/forums/showthread.php?t=85921

Something else that would be cool would be to be able to  limit the size of the images by resolution and not only by KB like it is done with the avatars.  When someone attaches an image larger than the resolution, the image auto-resizes like the option that the avatars has. The server would then only save the image with the resolution and size permitted.

Another strange thing that I saw was that in this page: http://phofan.com/forum/index.php/topic,635.0.html  is that when someone posts an image which is located in an external server a thumbnail of the image is generated anyway. I imagine that they must have some type of script . That when it finds (http://"web%20page") in the body of the message the script takes the web page and generates a thumbnail from it.

Here's the code that my friend the programer added to the MessageIndex.template.php

Part 1:
         $valorasdasd = explode('=',$topic['first_post']['href']);
$adjunto = '';
$sqlasdasd = "SELECT ID_ATTACH FROM smf_attachments WHERE ID_MSG = '".$topic['first_post']['id']."' limit 1";
$tasdasd = @mysql_query($sqlasdasd);


Part 2:

while($rasdasd = @mysql_fetch_row($tasdasd))
{
$adjunto  = '<a href="'.$topic['first_post']['href'].'"><img src="http://www.cgarts.com.ar/foro/thumnail.php?topic='.$valorasdasd[1].'&attach='.$rasdasd[0].'" alt="" border="0"></a>';
}



This is like it is applied to the MessageIndex.template.php:

<?php
// Version: 1.1; MessageIndex

function aver_imagenes($id$id_post)
{


}

function 
template_main()
{
global $context$settings$options$scripturl$modSettings$txt;
//Display Ads on the Message index
$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="4" class="catbg">'
$txt['parent_boards'], '</td>
</tr>'
;

foreach ($context['boards'] as $board)
{
echo '
<tr>
<td ' 
, !empty($board['children']) ? 'rowspan="2"' '' ' class="windowbg" width="6%" align="center" valign="top"><a href="'$scripturl'?action=unread;board='$board['id'], '.0">';

// If the board is new, show a strong indicator.
if ($board['new'])
echo '<img src="'$settings['images_url'], '/on.gif" alt="'$txt[333], '" title="'$txt[333], '" />';
// This board doesn't have new posts, but its children do.
elseif ($board['children_new'])
echo '<img src="'$settings['images_url'], '/on2.gif" alt="'$txt[333], '" title="'$txt[333], '" />';
// No new posts at all! The agony!!
else
echo '<img src="'$settings['images_url'], '/off.gif" alt="'$txt[334], '" title="'$txt[334], '" />';

echo '</a>
</td>
<td class="windowbg2">
<b><a href="'
$board['href'], '" name="b'$board['id'], '">'$board['name'], '</a></b><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']) == $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="middle" align="center" style="width: 12ex;"><small>
'
$board['posts'], ' '$txt[21], ' <br />
'
$board['topics'],' '$txt[330], '</small>
</td>
<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']))
{
// 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['name'] . '</a>';
$children[] = $child['new'] ? '<b>' $child['link'] . '</b>' $child['link'];
}

echo '
<tr>
<td colspan="3" class="windowbg'
, !empty($settings['seperate_sticky_lock']) ? '3' '''">
<small><b>'
$txt['parent_boards'], '</b>: 'implode(', '$children), '</small>
</td>
</tr>'
;
}
}

echo '
</table>
</div>'
;
}


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(
'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']),
'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'),
);

// 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'] . '&nbsp;&nbsp;<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"> Adjuntos </td>

<td class="catbg3"><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></td>

<td class="catbg3" width="11%"><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></td>

<td class="catbg3" 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="" />' '''</a></td>

<td class="catbg3" 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="" />' '''</a></td>

'
;
if ($context['show_rating'])
echo '
<td width="8%" class="catbg" align="center"><a href="'
$scripturl'?board='$context['current_board'], '.'$context['start'], ';sort=rating'$context['sort_by'] == 'rating' && $context['sort_direction'] == 'up' ';desc' '''">'$txt['ratings_rating'], $context['sort_by'] == 'rating' ' <img src="' $settings['images_url'] . '/sort_' $context['sort_direction'] . '.gif" alt="" border="0" />' '''</a></td>';
echo '
<td class="catbg3" width="22%"><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></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']) == $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'] == $txt['guest'] : $txt['guests'], $txt['who_viewing_board'], '
</small></td>
</tr>'
;
}

foreach ($context['topics'] as $topic)
{

$valorasdasd explode('=',$topic['first_post']['href']);
$adjunto '';
$sqlasdasd "SELECT ID_THUMB, ID_ATTACH FROM smf_attachments WHERE ID_MSG = '".$topic['first_post']['id']."' limit 1";
$tasdasd = @mysql_query($sqlasdasd);
while($rasdasd = @mysql_fetch_row($tasdasd))
{
if ($rasdasd[0] == 0$id_fotoooooooo $rasdasd[1];
else $id_fotoooooooo $rasdasd[0];
$adjunto  '<a href="'.$topic['first_post']['href'].'"><img src="http://www.cgarts.com.ar/foro/index.php?action=dlattach;topic='.$valorasdasd[1].';attach='.$id_fotoooooooo.';image" alt="" id="thumb_22" border="0"></a>';
}
// 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'], 0strrpos($topic['class'], '_sticky'));
if (!empty($settings['seperate_sticky_lock']) && strpos($topic['class'], 'locked') !== false)
$topic['class'] = substr($topic['class'], 0strrpos($topic['class'], '_locked'));

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>
<td class="windowbg"> '
.$adjunto.' </td>
<td class="windowbg' 
, !empty($settings['seperate_sticky_lock']) && $topic['is_sticky'] ? '3' '' '" valign="middle" ', (!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 id="msg_' $topic['first_post']['id'] . '">'$topic['first_post']['link'], '</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>';

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>
'
;
if ($context['show_rating'])
{
echo '
<td class="windowbg' 
$topic['is_sticky'] ? '3' '''" valign="middle" width="8%" align="center">';
if ($topic['rating']['empty'] == 1)
echo 'N/A';
else
{
for ($i 0$i $topic['rating']['whole']; $i++)
echo '<img src="'$settings['images_url'], '/star.gif" alt="*" border="0" />';
//!!! Should have a half star!
if (!empty($topic['rating']['half']))
echo '<img src="'$settings['images_url'], '/star.gif" alt="*" border="0" />';
}
echo '
</td>'
;
}
echo '
<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'] == && !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 != \'\' &amp;&amp; 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'] . '&nbsp;&nbsp;<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>'
;
/* global $db_server, $db_name, $db_user, $db_passwd;
echo $db_server.'-_-'.$db_name.'-_-'.$db_user.'-_-'.$db_passwd;
*/
}


// 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>'
;

echo '
<td 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 &amp;&amp; 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>&nbsp;
<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(' &nbsp;|&nbsp; '$buttonArray);
}


?>




I hope this helps. Maybe someone can finish giving shape to this mod.
I know that we will be able to solve this togeather.

Happy New Year
Title: Re: Where is this mode?
Post by: JayBachatero on January 02, 2007, 12:21:32 AM
I wouldn't recommend using this at all.
1st - It uses queries in template files.  This is a big disadvantage since it will be too template specific.
2nd - it is not recommended to surpass errors (@).
3rd - if someone that uses a different prefix uses this code it will give an error.
Title: Re: Where is this mode?
Post by: heavyccasey on January 02, 2007, 12:30:26 AM
I made a custom one for my own forums, but it never got released because
I simply didn't need it. It wasn't that long.
Title: Re: Where is this mode?
Post by: Tanks on January 03, 2007, 01:18:29 AM
Quote from: JayBachatero on January 02, 2007, 12:21:32 AM
I wouldn't recommend using this at all.
1st - It uses queries in template files.  This is a big disadvantage since it will be too template specific.
2nd - it is not recommended to surpass errors (@).
3rd - if someone that uses a different prefix uses this code it will give an error.

I dont get it.. i am using it now without any trouble ! Will it put heavy load on my server or something ??
This code was exactly what i needed so im using it on a few boards until something else comes along.

But then again i am only using one template on my forum and the prefix seems to be fine.
Title: Re: Where is this mode?
Post by: niko on January 03, 2007, 05:06:22 AM
Yes. It will make extra query for every topic in list which will slowdown. This can be done without any "extra"-query by adding some LEFT JOINs like I did.

Here's what I did.

Sources/MessageIndex.php
Before:

// Grab the appropriate topic information...
if (!$pre_query || !empty($topic_ids))


Add:

if (isset($modSettings['photo_boards']))
$modSettings['photo_boards'] = explode(',', $modSettings['photo_boards']);
else
$modSettings['photo_boards'] = array($board);

$context['show_thumbnails'] = false;


After:

LEFT(ml.body, 384) AS lastBody, LEFT(mf.body, 384) AS firstBody, ml.smileysEnabled AS lastSmileys,
mf.smileysEnabled AS firstSmileys,


Add:

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


After:

FROM ({$db_prefix}topics AS t, {$db_prefix}messages AS ml, {$db_prefix}messages AS mf)


Add:

" . (in_array($board, $modSettings['photo_boards']) ? "
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)" : '') . "


After:

// Begin 'printing' the message index for current board.
while ($row = mysql_fetch_assoc($result))
{
if ($row['ID_POLL'] > 0 && $modSettings['pollMode'] == '0')
continue;


Add:

// Image
if ($row['thnId'] != 0)
{
$image = array(
'id' => $row['thnId'],
'url' => $scripturl . '?action=dlattach;topic=' . $row['ID_TOPIC'] . '.0;attach=' . $row['thnId'] . ';image',
'link' => $scripturl . '?action=dlattach;topic=' . $row['ID_TOPIC'] . '.0;attach=' . $row['bigId'] . ';image',
'filename' => $row['thnFilename'],
'width' => $row['thnWidth'],
'height' => $row['thnHeight']
);

$context['show_thumbnails'] = true;
}
elseif ($row['bigId'] != 0 && $row['bigWidth'] > 0 && $row['bigHeight'] > 0)
{
$image = array(
'id' => $row['bigId'],
'url' => $scripturl . '?action=dlattach;topic=' . $row['ID_TOPIC'] . '.0;attach=' . $row['bigId'] . ';image',
'link' => $scripturl . '?action=dlattach;topic=' . $row['ID_TOPIC'] . '.0;attach=' . $row['bigId'] . ';image',
'filename' => $row['bigFilename'],
'width' => $row['bigWidth'],
'height' => $row['bigHeight']
);

$context['show_thumbnails'] = true;
}
else
$image = array();

if (isset($context['topics'][$row['ID_TOPIC']]))
{
$context['topics'][$row['ID_TOPIC']]['image'][] = $image;
continue;
}


After:

// 'Print' the topic info.
$context['topics'][$row['ID_TOPIC']] = array(
'id' => $row['ID_TOPIC'],


Add:

'image' => array($image),


MessageIndex.template.php

<td width="9%" colspan="2" class="catbg3"></td>


Replace with

<td width="9%" colspan="', $context['show_thumbnails'] ? 3 : 2, '" class="catbg3"></td>


After

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>';


Add:

if ($context['show_thumbnails'])
{
echo '
<td class="windowbg2" valign="middle" align="center">';

if (isset($topic['image'][0]['id']))
{
$image = &$topic['image'][0];

echo '
<a href="', $image['link'], '"><img src="', $image['url'], '" width="', $image['width'], '" height="', $image['height'], '" alt="" /></a>';
}

echo '
</td>';
}


I may make real mode someday... if someone else doesn't do it first... (you may use this code as a part but you must mention it somewhere ;)) This will load every image attached and thumbnails for them if there are. (show currently first image only). Maybe use javascript to show other images on mouse over or something

This is at least better than other code posted here (imo).
Title: Re: Where is this mode?
Post by: Tanks on January 03, 2007, 05:40:22 AM
Nico, i get this 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 'mf.smileysEnabled AS firstSmileys
FROM (smf_topics AS t, smf
Fil: /hsphere/local/home/kjartan/gapeindex.dk/Sources/MessageIndex.php
Linie: 500


Can you look at my files: http://www.gapeindex.dk/thumbview.zip

.. would love to get it to work if this uses less server resources  :)[/s]

found it

there is no comma at the end of this code.. you have to add it

LEFT(ml.body, 384) AS lastBody, LEFT(mf.body, 384) AS firstBody, ml.smileysEnabled AS lastSmileys,
mf.smileysEnabled AS firstSmileys,


But now im getting this error  >:( It aint easy LoL  :D

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /hsphere/local/home/kjartan/gapeindex.dk/Themes/covers/MessageIndex.template.php on line 275
Title: Re: Where is this mode?
Post by: niko on January 03, 2007, 06:03:20 AM

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>


you have to close this echo with ';

and after if start new:

So it becomes like this:


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>';

if ($context['show_thumbnails'])
{
echo '
<td class="windowbg2" valign="middle" align="center">';

if (isset($topic['image'][0]['id']))
{
$image = &$topic['image'][0];

echo '
<a href="', $image['link'], '"><img src="', $image['url'], '" width="', $image['width'], '" height="', $image['height'], '" alt="" /></a>';
}

echo '
</td>';
}

echo '
<td class="windowbg' , !empty($settings['seperate_sticky_lock']) && $topic['is_sticky'] ? '3' : '' , '" valign="middle" ', (!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'] . '\');"' : ''), '>';
Title: Re: Where is this mode?
Post by: Tanks on January 03, 2007, 06:16:47 AM
Thanks that made it work.. but it just made a new ugly bug show up LoL.. the board i am using this on has 92 topics.. but when i open it only 10 topics shows up on the messageindex... this has something to do with the code in the sources/messageindex.php becuase when i restore my backup all the topics shows up again.

Any idea why it does this ?  :o

And on a different board that hass 200+ topics it shows me red crosses and all topic titles etc are gone  :(


Here is my two files: http://www.gapeindex.dk/thumbview.zip if you can have a look at it pleeease  :D
Title: Re: Where is this mode?
Post by: niko on January 03, 2007, 07:03:04 AM
I think it is because of multiple attachements.

try adding GROUP BY ID_TOPIC to have only one per topic loaded. (to query in MessageIndex)

(new line before ORDER BY line).
Title: Re: Where is this mode?
Post by: Tanks on January 03, 2007, 07:13:44 AM
Sorry my php skills are to weak to do what you ask

Can you show me exactly what to do please  :) And thanks for helping me  :)
Title: Re: Where is this mode?
Post by: niko on January 03, 2007, 07:31:46 AM
Oh sorry.

Find this from MessageIndex.php

AND ml.ID_MSG = t.ID_LAST_MSG
AND mf.ID_MSG = t.ID_FIRST_MSG
ORDER BY " . ($pre_query ? "FIND_IN_SET(t.ID_TOPIC, '" . implode(',', $topic_ids) . "')" : (!empty($modSettings['enableStickyTopics']) ? 'isSticky' . ($fake_ascending ? '' : ' DESC') . ', ' : '') . $_REQUEST['sort'] . ($ascending ? '' : ' DESC')) . "
LIMIT " . ($pre_query ? '' : "$start, ") . "$maxindex", __FILE__, __LINE__);


Replace with

AND ml.ID_MSG = t.ID_LAST_MSG
AND mf.ID_MSG = t.ID_FIRST_MSG
ORDER BY " . ($pre_query ? "FIND_IN_SET(t.ID_TOPIC, '" . implode(',', $topic_ids) . "')" : (!empty($modSettings['enableStickyTopics']) ? 'isSticky' . ($fake_ascending ? '' : ' DESC') . ', ' : '') . $_REQUEST['sort'] . ($ascending ? '' : ' DESC')) . "
GROUP BY t.ID_TOPIC
LIMIT " . ($pre_query ? '' : "$start, ") . "$maxindex", __FILE__, __LINE__);


(changed to t.ID_TOPIC to make sure it won't conflict with anything)
Title: Re: Where is this mode?
Post by: Tanks on January 03, 2007, 07:39:47 AM
Buuhuuu i now get this

QuoteYou have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP BY t.ID_TOPIC
LIMIT 0, 20' at line 27
Fil: /hsphere/local/home/kjartan/gapeindex.dk/Sources/MessageIndex.php
Linie: 501

Looks like its not my lucky day today  :P
Title: Re: Where is this mode?
Post by: niko on January 03, 2007, 07:48:29 AM
My bad I made mistake. Group by belongs before order by. Sorry (again).


AND ml.ID_MSG = t.ID_LAST_MSG
AND mf.ID_MSG = t.ID_FIRST_MSG
GROUP BY t.ID_TOPIC
ORDER BY " . ($pre_query ? "FIND_IN_SET(t.ID_TOPIC, '" . implode(',', $topic_ids) . "')" : (!empty($modSettings['enableStickyTopics']) ? 'isSticky' . ($fake_ascending ? '' : ' DESC') . ', ' : '') . $_REQUEST['sort'] . ($ascending ? '' : ' DESC')) . "
LIMIT " . ($pre_query ? '' : "$start, ") . "$maxindex", __FILE__, __LINE__);

Title: Re: Where is this mode?
Post by: Tanks on January 03, 2007, 07:53:28 AM
You are my new best friend (http://gapeindex.dk/Smileys/green_smiles/yahoo.gif) LoL

This works perfect now.. amazing.. Thanks 100000000 times for helping me get this to work.. and thanks for being patient with me  :D  :D  :D

Great stuff  ;)
Title: Re: Where is this mode?
Post by: Tanks on January 05, 2007, 02:37:34 PM
Hey Nico

The pictures on my messageindex shows perfectly.. i am so thankful.. my forum has never looked this cool before.. its perfect for my movies & Gallery sections.

Can this somehow be applyed to the show unread and unreadreplies ?

Would look really good if it could be done  :D

Anyway thanks again for making this cool feature  ;)
Title: Re: Where is this mode?
Post by: Spike2 on April 27, 2007, 10:50:13 AM
Hey any one has any new about a mod like this one?  :(
Title: Re: Where is this mode?
Post by: Tanks on April 27, 2007, 12:02:35 PM
Quote from: spike2 on April 27, 2007, 10:50:13 AM
Hey any one has any new about a mod like this one?  :(

Just read up and make the changes yourself.. i use this on my forum and it is working like a charm.. no need for mod.. changes are easy to make ;)
Title: Re: Where is this mode?
Post by: CraftyLion on May 06, 2007, 07:40:21 PM
I've just been implementing the mod and I seem to be getting this error and I can't fix it. Mind you, my php isn't all that flash so any help would be greatly appreciated.


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 'FROM (smf_topics AS t, smf_messages AS ml, smf_messages AS mf)

LEFT J' at line 14
File: /home/ofstagea/www/www/Sources/MessageIndex.php
Line: 470


The string I have is this:

FROM ({$db_prefix}topics AS t, {$db_prefix}messages AS ml, {$db_prefix}messages AS mf)
" . (in_array($board, $modSettings['photo_boards']) ? "
LEFT JOIN {$db_prefix}attachments AS big ON (big.ID_MSG = mf.ID_MSG AND big.attachmentType = 0)


Anyone help?
Title: Re: Where is this mode?
Post by: Tanks on May 27, 2007, 01:08:38 PM
Still using this on all boards on my site.. its really good and my members love it, but

Can this somehow be applyed to the show unread and unreadreplies ?  ???

It would make my board near perfect if it could be done  ;)
Title: Re: Where is this mode?
Post by: Tanks on May 28, 2007, 06:05:58 AM
I tried making the same changes to the recent.template.php as this code makes to the messageindex.template.php but nothing changed.. nothing at all.. so i must be doin it worng.. if anybody can help me achieve this i will be forever thankful  :)

What i need are these thumbnails, that i already have showing on messageindex, to show up on the unread and unreadreplies pages.. they are already there in the $context i think.. they just need to be inserted somehow.. please help
Title: Re: Where is this mode?
Post by: mywings on September 20, 2007, 10:32:11 AM
Hi all !

First : special thanks to niko for this code !

But i have some troubles with my theme...maybe it's my MessageIndex.template.php ...

I use a SMF 1.1.2 ,

Someone can read my files please ?

http://espaceguitariste.free.fr/download/thumview.rar

Thanks

:-)

Title: Re: Where is this mode?
Post by: samurai-lupin on May 03, 2008, 06:02:35 AM
Hello, can one also define for which boards this mod should be used? I mean I do not want to use thumbs on all of my boards but just on some. What code would I need to change for this? Thanks!
Title: Re: Where is this mode?
Post by: vbgamer45 on May 03, 2008, 09:14:34 AM
You might be able to do that insert a setting into the settings table called "'photo_boards"

And then for the value insert the boardid seperate each boardid with a comma
Title: Re: Where is this mode?
Post by: samurai-lupin on May 03, 2008, 08:25:44 PM
Hello vbgamer!

Thanks for your reply.

I assume I would have to add the board id numbers somewhere here?

if (isset($modSettings['photo_boards']))
$modSettings['photo_boards'] = explode(',', $modSettings['photo_boards']);
else
$modSettings['photo_boards'] = array($board);


Could you please kindly let me know where exactly?

Thank you!
Title: Re: Where is this mode?
Post by: samurai-lupin on May 04, 2008, 06:58:40 PM
I tried figuring it out myself but it unfortunately kept on producing errors in my former.

If anybody knows how I can exclude or include boards on which this mod should be applied, please kindly let me know.

Thank you!
Title: Re: Where is this mode?
Post by: Adalla on July 17, 2008, 05:36:47 AM
I just tried installing the Thumbnail Toic Mod By: vbgamer45/Niko, and I got the following error:

Error in Package Installation

At least one error was encountered during a test installation of this package. It is strongly recommended that you do not continue with installation unless you know what you are doing, and have made a backup very recently. This error may be caused by a conflict between the package you're trying to install and another package you have already installed, an error in the package, a package which requires another package that you don't have installed yet, or a package designed for another version of SMF.

Installing 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

The mod referred to this topic, so I posted here.

I'm using SMF 1.1.5 and it's supposed to be compatible...
Title: Re: Where is this mode?
Post by: sizofren on September 16, 2008, 09:16:50 AM
hello everyone  i have a question. İ instaled  attachments (this) mod.i get the errors and than i instaled another forum.intaled this mod than i get the messageindex.php and messageindex.template.php from ftp.i instaled old forum. its worked.


this is be any problem?

i wait your comments
Title: Re: Where is this mode?
Post by: HR on December 01, 2008, 03:12:23 PM
Can this mod be adjusted (since its going to the topic view rather than message view) to use avatar sizes rather than attachment sizes?

For the time being I shortcutted it

'width' => $row['bigWidth']/3,
'height' => $row['bigHeight']/3


And.. can we have the thing scan all attachments and display the first one it finds.. I find that with over 22000 posts its a bit frustrating to reorganize them all (actually @ 10%) OR find a way to alter the attachment order rather than modifying and dropping things to reup.
Title: Re: Where is this mode?
Post by: HR on December 05, 2008, 11:21:54 AM
OK, so I guess this is a dead mod after all
Title: Re: Where is this mode?
Post by: Tanks on May 07, 2009, 07:04:09 AM
Is niko still around ?

Im sure my old best friend would be able to post how to make this happen on 2.0 RC1 :)

Title: Re: Where is this mode?
Post by: sizofren on September 04, 2009, 04:10:17 AM
thanks for answers i solved ;) thanks
Title: Re: Where is this mode?
Post by: ittiphol on July 05, 2019, 06:06:44 AM
Quote from: niko on January 03, 2007, 07:48:29 AM
My bad I made mistake. Group by belongs before order by. Sorry (again).


AND ml.ID_MSG = t.ID_LAST_MSG
AND mf.ID_MSG = t.ID_FIRST_MSG
GROUP BY t.ID_TOPIC
ORDER BY " . ($pre_query ? "FIND_IN_SET(t.ID_TOPIC, '" . implode(',', $topic_ids) . "')" : (!empty($modSettings['enableStickyTopics']) ? 'isSticky' . ($fake_ascending ? '' : ' DESC') . ', ' : '') . $_REQUEST['sort'] . ($ascending ? '' : ' DESC')) . "
LIMIT " . ($pre_query ? '' : "$start, ") . "$maxindex", __FILE__, __LINE__);


sorry to reply this post

how to fix default image if image is not attach file

thank you
Title: Re: Where is this mode?
Post by: Irisado on July 05, 2019, 08:23:39 AM
This topic is nearly ten year old.  Please start a new topic if you require support with this issue or want to request a mod, rather than revive such an old one as this.