UBB.Dev
Posted By: on2dvd Attachments - 03/28/2005 12:35 AM
Hi

Is there a way to make the attachment links be more obvious to users? If you don't know where to look you miss it very easy.
Posted By: AKD96 Re: Attachments - 03/28/2005 11:10 AM
Um... yes? Make it bold? Make it a different color? Move it? Couldn't think of those?
Posted By: on2dvd Re: Attachments - 03/29/2005 5:58 AM
Well, yes, of course. I just don't know how to do it.
Posted By: JoshPet Re: Attachments - 03/29/2005 8:56 AM
In showflat.tmpl template look for this:

{$postrow[$i]['filelink']}

Add bold, or color, or size html tags around it as you wish.

Example:

<b><font size="+1">{$postrow[$i]['filelink']}</font></b>


In showthreaded.tmpl what you're looking for is this:


$filelink

Posted By: on2dvd Re: Attachments - 03/29/2005 9:04 AM
Hey that's great, I'll try it once I've sorted out this other problem I'm faced with.
I'm trying to upload an attachment of 3.2MB zip file (size limit set to around 8MB) and everytine I do it it seems to get uploaded, no errors, the page comes up to say it's been added. BUT, no file...... looked in the folder, not there. Others have had success with zip files so it's not an extention thing and smaller zip files work for me.
Posted By: JoshPet Re: Attachments - 03/29/2005 9:24 AM
Generally PHP has a 2 MB limit - which you can't override from within threads. If it's your server, you can edit the php.ini file for your PHP configuration and raise the limit. Otherwise on most servers, the default max built into php for file uploads will be 2MB.
Posted By: on2dvd Re: Attachments - 03/29/2005 9:44 AM
Ahhh, that must be it. I'll contact my host provider and get them to change it.
Posted By: on2dvd Re: Attachments - 03/30/2005 2:48 AM
[]JoshPet said:
In showflat.tmpl template look for this:

{$postrow[$i]['filelink']}

Add bold, or color, or size html tags around it as you wish.

Example:

<b><font size="+1">{$postrow[$i]['filelink']}</font></b>


In showthreaded.tmpl what you're looking for is this:


$filelink

[/]

Iv'e got that allsussed out thankyou.
Now if I want to put the disk icon to the left of the "attachment link" I would put this string <img src="http://dvdquestions.com.au/ubbthreads/images/icons/disk.gif" somewhere, but where? If I put it in the same place it appears in all the posts in that thread.

Thanks
Posted By: JoshPet Re: Attachments - 03/30/2005 4:22 AM
You can look in showflat.php and showthreaded.php - search for those variables ($filelink etc...) and you'll see where the HTML is defined. You can add it there.
Posted By: on2dvd Re: Attachments - 03/30/2005 4:51 AM
Does it go in the same spot as when I changed it to bold? As I mentioned it goes on every post in the thread then.

Here's what I have

<font class="small">
<a name="#{$postrow[$i]['Number']}">#<span id="number$i">{$postrow[$i]['Number']}</span> - {$postrow[$i]['time']} <i>{$postrow[$i]['IP']}</i>
<b>{$postrow[$i]['filelink']}</b>
</font>

and I was adding
<image scr="http://dvdquestions.com.au/ubbthreads/images/icons/disk.gif" before this bit <b>{$postrow[$i]['filelink']}</b>

What I do wrong?
Posted By: JoshPet Re: Attachments - 03/30/2005 5:11 AM
No the showflat.php and showthreaded.php scripts (not template). Search for those variables and you'll see where they defined.
Posted By: on2dvd Re: Attachments - 03/30/2005 5:42 AM
ahhhhh, but I'm still not doing it right.

My line in the script

$postrow[$i]['filelink'] =<img src=\http://dvdquestions.com.au/ubbthreads/images/icons/disk.gif"<a href="{$config['phpurl']}/download.php?Number=$Number">{$ubbt_lang['FILE_ATTACH']}</a> ($downloads {$ubbt_lang['DOWNLOADS']})";

errors
Posted By: JoshPet Re: Attachments - 03/30/2005 6:55 AM
Your HTML is a mess. Missing a quote and a closing tag.

$postrow[$i]['filelink'] = "<img src="http://dvdquestions.com.au/ubbthreads/images/icons/disk.gif" alt="{$ubbt_lang['FILE_ATTACH']}"/><a href="{$config['phpurl']}/download.php?Number=$Number">{$ubbt_lang['FILE_ATTACH']}</a> ($downloads {$ubbt_lang['DOWNLOADS']})";

Should do it.
Posted By: on2dvd Re: Attachments - 03/30/2005 7:08 AM
Just like spaghetti hehe

Posted By: JoshPet Re: Attachments - 03/30/2005 9:45 AM
© UBB.Developers