Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Aiheen aloitti: SNewman - tammikuu 23, 2009, 10:05:44 AP

Otsikko: New Problems
Kirjoitti: SNewman - tammikuu 23, 2009, 10:05:44 AP
Sorry everyone...I usually don't have this much trouble but I seem to always find new stuff thats not working :-[  I'm running SMF 2.0 Beta 4 btw. (http://www.psplockhaven.org/index.php (http://www.psplockhaven.org/index.php))

I'm not sure if you'll be able to help me on this one since it involves a MOD, but I thought I'd ask anyway.  I have the Downloads System from http://www.smfhacks.com/ (http://www.smfhacks.com/) installed.  What I'm trying to do is on the page where all the files in a given category are listed, I want to add an icon next to the filename based upon the file type.  Here is the code I have:

File: Themes/default/Downloads2.template.php
foreach ($context['downloads_files'] as $i => $file)
{

echo '<tr>';

                        $fName = $file['orginalfilename'];
                        $ext = substr(strrchr($fName, '.'), 1);

                             $ikon = "http://www.psplockhaven.org/Themes/default/images/docType/" . $ext . ".gif";
                         
                        echo '<td><img src="' . $ikon . '" alt="' . $ext . '"></td>';

if (!empty($modSettings['down_set_t_title']))
echo  '<td><a href="' . $scripturl . '?action=downloads;sa=view;down=', $file['ID_FILE'], '">', $file['title'], '</a></td>';


I've checked the SQL tables, and there is indeed a column named 'orginalfilename', so I have no idea why it's not reading it.  For the longest time I had been using 'originalfilename', the correct spelling, but I noticed that the column name had been misspelled.

As always, any help would be greatly appreciated :)
Otsikko: Re: New Problems
Kirjoitti: NEMINI - tammikuu 23, 2009, 01:23:47 IP
aask over at smfhacks since the made the mod.
Otsikko: Re: New Problems
Kirjoitti: SNewman - tammikuu 25, 2009, 10:49:33 IP
Is there any possible way you can help me?  It's been a day or two since I've posted on SMFHacks and have received no replies.  Thanks :)
Otsikko: Re: New Problems
Kirjoitti: greyknight17 - tammikuu 26, 2009, 09:02:18 IP
You should go back to that topic you posted there and give it a friendly bump since it's been two days. We try to answer all the questions, but there are some that should be posted somewhere else. In this case, it will require someone who's familiar with that mod. Your best bet is the support topic over at SMFHacks.