News:

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

Main Menu

Re: Decrypt attachment files

Started by fishoaus, August 31, 2021, 07:28:23 AM

Previous topic - Next topic

shadav

can you upload your
theme's display.template.php and in your sources folder the display.php
as attachments
if your theme doesn't have the display.template.php then it uses the one in the default folder
just to compare them with default files and see if there might be something wrong there
but yeah nothing that you posted of the mods above should have messed anything up

with so few mods I'd say just download fresh files of 2.0.18 and upload them overwriting your current files and then reinstall themes and mods
however the themes you use I'm fairly sure are not found anymore and well are outdated

Arantor

Quote from: Aleksi "Lex" Kilpinen on September 08, 2021, 01:18:38 PMI don't think Levertine really does anything about attachments in posts, so that one seems unlikely. Though it does add a lot of permissions handling regarding the gallery.

Correct, it does nothing to this at all.

Sir Osis of Liver

Haven't had any problems with DS themes in 2.0.18.  Don't have newbalance, that may have been a paid theme.  But do as shadav suggested -

https://wiki.simplemachines.org/smf/How_to_upload_a_fresh_set_of_files

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Arantor


fishoaus

 Levertine Gallery 1.1.1, was made by a a well known smf legend, but i am not sure if there real active in doing stuff on here now,
 

Arantor

I'm not developing the gallery. I haven't in years.

fishoaus

Quote from: Arantor on September 09, 2021, 04:29:45 AMYes, newBalance was a paid theme.

yes i did pay for it many years ago, when dzinerstudio was active, you even helped me with the code to put ads under nav menu in newbalance may still have your code some where  so it could of change ads after a time frame some where i had a different user name on there the owner  wife desinged new post no neww post avatars for me as well

fishoaus


fishoaus


fishoaus

I still have no luck would you call this forum a ride off with attachments, images & start again?????

Sir Osis of Liver

Have you tried uploading clean files?  If you can pm cpanel access I'll have a look tonight.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

fishoaus

Quote from: Sir Osis of Liver on September 17, 2021, 12:59:00 PMHave you tried uploading clean files?  If you can pm cpanel access I'll have a look tonight.

Have PM,ed access

Sir Osis of Liver

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Sir Osis of Liver

This is a strange one.  Attachment settings are correct, pics can be d/l'd from link under post and displayed in image editor.  Database setting can be toggled on/off as per normal.  Have a clean 2.0.18 install running in subdir, imported prod database, old attachments aren't displayed, new ones display correctly.  If I d/l image from prod forum that is not displayed, it doesn't display on test forum until it's opened in image editor and saved, it then displays correctly on test forum, not prod forum.  Looks like a mod is affecting the files. 

Installed mods:
  Simple Audio Video Embedder 6.0.4
  TinyPortal 2.1.0
  Contact Page 5.0.1a
  Sortable Packages (and Installed Time) 1.3.5
  Levertine Gallery 1.1.1

AEVA was installed at one time, iirc it was problematic and removed from mod site, wondering if there may be some remnant code that's damaging uploads.  Next thing to do is clean install on prod forum, but there'a a lot of custom work on prod theme.  Main concern is if attachments are damaged, is there any way to fix 460 files in bulk. 

I'm beat, will get back to this tomorrow night.  If anyone has any ideas, would be appreciated.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

shadav

I have all of those mods installed without said issue, except for levertine gallery though I doubt that would be the cause and I never used aeva but maybe it caused issues

if opening and saving the files seems to work, maybe use an image optimizer and see if that does the trick
you can use this one for bulk uploads
kraken.io/web-interface

Arantor

AEVA never touched the attachments system.

Sir Osis of Liver

Sadly, my Logitech solar keyboard seems to have died since last night.  Can't do much with this onscreen keyboard, will have to look through my vast collection of computer stuff and see if I can find a keyboard that works with this computer.

<sigh>
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Sir Osis of Liver

 :)  It's come back to life, just needed a little light.

Ok, here's what's happening tonight.  Attach a clean image to a post (bushwick.jpg), it displays the link, no image.  When I click on the link I can d/l the image, it displays normally in image editor (bushwick2.jpg).  Attach it to post in test forum, no go.  Save it in editor as bushwick3.jpg, it attaches and displays normally in test forum, not prod forum.  Let's see what it does here.

As you can see, the image that was uploaded/downloaded to/from prod forum (bushwick2.jpg) does not display here, either.  It works after it's been d/l'd and saved in image editor (bushwick3.jpg).  bushwick2.jpg loads normally in editor, but forum can't display it.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

fishoaus

i"ll down a few images open in editor then re save then up load  to my forum for a test from me

Sir Osis of Liver

FYI anyone following this topic, attachment glitch was caused by code in index.template.php that OP used to add his own copyright to footer -


function template_body_below()
{
    global $context, $settings, $options, $scripturl, $txt, $modSettings;

            echo '
                </div>
            </div>';

        // Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
        echo '
            <div id="footer">
                <ul class="reset">
                    </li>              
                    <li>', theme_copyright(), '</li>
                                                                                <li class="copyright "><strong><style scoped>
.blackText {color:black;}
</style>
<p class="blackText">© 2021 BREAMALLIANCE.COM</p>
</div>
</p>
<a> </ul>
                </ul>';

                // Show the load time?
                if ($context['show_load_time'])
                echo '
                    <p>', $txt['page_created'], $context['load_time'], $txt['seconds_with'], $context['load_queries'], $txt['queries'], '</p>';
        echo '
            </div>
        </div>
    </div>
</div>';
}


Replaced it with this, solved the problem -


function template_body_below()
{
    global $context, $settings, $options, $scripturl, $txt, $modSettings;

            echo '
                </div>
            </div>';

        // Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
        echo '
            <div id="footer">
                <ul class="reset">
                    <li>', theme_copyright(), '</li>
                    <li style="color: black; font-weight: bold;">&copy; 2021 BREAMALLIANCE.COM</li>
                </ul>';

                // Show the load time?
                if ($context['show_load_time'])
                echo '
                    <p>', $txt['page_created'], $context['load_time'], $txt['seconds_with'], $context['load_queries'], $txt['queries'], '</p>';

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


Don't have remotest clue why original code was damaging attachments.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Advertisement: