News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Thumbnail on Topic Listing

Started by SMFHacks.com Team, April 04, 2008, 01:05:48 PM

Previous topic - Next topic

vbgamer45

Update
Version 4.2.1
!Group by fixes for SMF 2.1.x
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Rgvill

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.

vbgamer45

You would need to apply the theme edits to your theme. you can find the theme edit instructions on the mod site page.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Rgvill

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

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Doug Heffernan

Quote from: Rgvill on October 04, 2022, 12:08:40 PM
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

Put the mod through the Parser and then apply all the edits displayed manually to your theme.

Rgvill


Doug Heffernan

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.

Rgvill

#568
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)

Diego Andrés

You could uninstall the mod, and install it again but mark the other themes during installation.

SMF Tricks - Free & Premium Responsive Themes for SMF.

Doug Heffernan

#570
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.

Kindred

... and we could not do it for you anyway, since we don't have access to edit your files.
Слaва
Украинi

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

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

Rgvill

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?"

Steve

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?
DO NOT pm me for support!

Rgvill

Quote from: Steve on October 04, 2022, 07:17:37 PM
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?

I followed Diego's instructions and when I checked the box to apply it to another theme, that's what I get.

Steve

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.
DO NOT pm me for support!

Rgvill

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.

Rgvill

#577
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 '

Rgvill

#578
Quote from: Steve on October 04, 2022, 07:17:37 PM
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?



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

Steve

#579
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?
DO NOT pm me for support!

Advertisement: