Attachment Mod

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
2035
71%
Very Good
444
16%
Good
175
6%
Fair
54
2%
Poor
156
5%
 
Total votes: 2864

baz.g
Registered User
Posts: 14
Joined: Mon Oct 24, 2005 11:16 am
Location: England
Contact:

Post by baz.g » Tue Dec 13, 2005 2:08 pm

Hi i have a slight problem with this attachment mod, i have installed everything to the letter and i have the ArgenBlue template on my forums: http://www.bigcomputers.co.uk

everytime i attach something to any post and i click preview i can see the attachment fine but when i actually submit the post the attachment disappears, there is no attach icon on the post and nothing about the attachment whatsoever, they are definately allowed file extensions i have checked that, plz help

Baz

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17052
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Post by DavidIQ » Tue Dec 13, 2005 2:29 pm

Do the files actually get uploaded to your server? Also did you put the included .tpl files in your ArgenBlue template folder?
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.

baz.g
Registered User
Posts: 14
Joined: Mon Oct 24, 2005 11:16 am
Location: England
Contact:

Post by baz.g » Tue Dec 13, 2005 3:49 pm

all the .tpl files were put in the argenblue templates folder as required and it does upload the file to the files directory but i have just noticed it slightly renames them. i.e. i uploaded test.jpg and it renamed it to test_102.jpg

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17052
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Post by DavidIQ » Tue Dec 13, 2005 3:58 pm

baz.g wrote: all the .tpl files were put in the argenblue templates folder as required and it does upload the file to the files directory but i have just noticed it slightly renames them. i.e. i uploaded test.jpg and it renamed it to test_102.jpg

That's actually "normal" when it comes to this mod. Can you give me an example of a posting on your board where you attached a file?
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.

baz.g
Registered User
Posts: 14
Joined: Mon Oct 24, 2005 11:16 am
Location: England
Contact:

Post by baz.g » Tue Dec 13, 2005 4:07 pm

thanx very much for your help with this mate :)

here is an example:

http://www.bigcomputers.co.uk/viewtopic.php?p=192#192

catharsis3k
Registered User
Posts: 3
Joined: Tue Dec 13, 2005 4:08 pm

Can not view attachments in Aphrodite

Post by catharsis3k » Tue Dec 13, 2005 4:16 pm

I installed this mod after installing the Aphrodite style.

here's exactly what I did:

copied the attachment mod files as instructed in install.txt

the files destined for the subsilver folder were copied in the Aphrodite folder.

the mods required in the phpbb files were done by hand in the proper files and at the proper places!

I can attach stuff to posts, I see the paperclip but not the actual attachment. And this only in Aphrodite. If I switch to subsilver, I see them just fine!

I started tracing things back in Aphrodite in viewtopic_body.tpl and that's where I have these lines:

<div class="post-text">
{postrow.MESSAGE}<br /><br />
<span class="gensmall">{postrow.EDITED_MESSAGE}</span>
{postrow.ATTACHMENTS}
{postrow.SIGNATURE}
</div>

I went back into the code trying to figure out why it's not parsed and I got as far as as the display_attachments($post_id) function in attach_mod/displaying.php . My attachment type is an image and thus I did the following:

if ($image)
{
print "It's an image!!!";


My little add-on correctly displays in the page, but not the actual image itself.

Furthermore, inside the source code of the that topic there are no elements from the viewtopic_attach_body.tpl file.

It's as if it's not included at all even though $complete_filename is set to viewtopic_attach_body.tpl in function init_display_template($template_var, $replacement, $filename = 'viewtopic_attach_body.tpl')

Anyone can give me some hints as to where to look next ? I am a bit technical but require some expert help to dig me out of this one!

Thanks

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17052
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Post by DavidIQ » Tue Dec 13, 2005 4:28 pm

baz.g wrote: thanx very much for your help with this mate :)

here is an example:

http://www.bigcomputers.co.uk/viewtopic.php?p=192#192

You might want to check your viewforum.php and viewtopic.php files. Your .tpl files seem to be ok and have what's needed. Does the attachment mod show up in your profile and in the Admin Control Panel?
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.

ChickenHawk
Registered User
Posts: 40
Joined: Sat Dec 10, 2005 4:41 pm
Contact:

Almost lol

Post by ChickenHawk » Tue Dec 13, 2005 4:30 pm

Extension Control

Warning: mysql_free_result(): 39 is not a valid MySQL result resource in /home/chickenh/public_html/bboard/db/mysql4.php on line 318
DiD I do that?

baz.g
Registered User
Posts: 14
Joined: Mon Oct 24, 2005 11:16 am
Location: England
Contact:

Post by baz.g » Tue Dec 13, 2005 4:34 pm

DavidIQ wrote: You might want to check your viewforum.php and viewtopic.php files. Your .tpl files seem to be ok and have what's needed. Does the attachment mod show up in your profile and in the Admin Control Panel?


yes all the attachment mod stuff is in the ACP, i had a look at the viewforum and viewtopic.php files but i really dont know what i am looking for :(

the attachment mod seems to be in my profile as well:

Upload Quota:
0
0% 50% 100%
[Uploaded: 0 Bytes / Quota: 50 MB / 0% of total]
User Attachment Control Panel

but by that i see that it doesnt recognise that i have attached anything?

u r being great and thanx so much, i look forward to your next reply :)

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17052
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: Can not view attachments in Aphrodite

Post by DavidIQ » Tue Dec 13, 2005 4:40 pm

catharsis3k wrote: I installed this mod after installing the Aphrodite style.

here's exactly what I did:

copied the attachment mod files as instructed in install.txt

the files destined for the subsilver folder were copied in the Aphrodite folder.

the mods required in the phpbb files were done by hand in the proper files and at the proper places!

I can attach stuff to posts, I see the paperclip but not the actual attachment. And this only in Aphrodite. If I switch to subsilver, I see them just fine!

I started tracing things back in Aphrodite in viewtopic_body.tpl and that's where I have these lines:

<div class="post-text">
{postrow.MESSAGE}<br /><br />
<span class="gensmall">{postrow.EDITED_MESSAGE}</span>
{postrow.ATTACHMENTS}
{postrow.SIGNATURE}
</div>

I went back into the code trying to figure out why it's not parsed and I got as far as as the display_attachments($post_id) function in attach_mod/displaying.php . My attachment type is an image and thus I did the following:

if ($image)
{
print "It's an image!!!";


My little add-on correctly displays in the page, but not the actual image itself.

Furthermore, inside the source code of the that topic there are no elements from the viewtopic_attach_body.tpl file.

It's as if it's not included at all even though $complete_filename is set to viewtopic_attach_body.tpl in function init_display_template($template_var, $replacement, $filename = 'viewtopic_attach_body.tpl')

Anyone can give me some hints as to where to look next ? I am a bit technical but require some expert help to dig me out of this one!

Thanks

I don't know that it would matter but it should probably be this:

Code: Select all

 <div class="post-text">
{postrow.MESSAGE}<br /><br />
<span class="gensmall">{postrow.EDITED_MESSAGE}</span>
{postrow.ATTACHMENTS}
<span class="gensmall">{postrow.SIGNATURE}</span>
</div> 
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.

catharsis3k
Registered User
Posts: 3
Joined: Tue Dec 13, 2005 4:08 pm

Re: Can not view attachments in Aphrodite

Post by catharsis3k » Tue Dec 13, 2005 4:45 pm

DavidIQ wrote: I don't know that it would matter but it should probably be this:

Code: Select all

 <div class="post-text">
{postrow.MESSAGE}<br /><br />
<span class="gensmall">{postrow.EDITED_MESSAGE}</span>
{postrow.ATTACHMENTS}
<span class="gensmall">{postrow.SIGNATURE}</span>
</div> 



you're right...it didn't do nothing

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17052
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Post by DavidIQ » Tue Dec 13, 2005 4:55 pm

baz.g wrote:
DavidIQ wrote: You might want to check your viewforum.php and viewtopic.php files. Your .tpl files seem to be ok and have what's needed. Does the attachment mod show up in your profile and in the Admin Control Panel?


yes all the attachment mod stuff is in the ACP, i had a look at the viewforum and viewtopic.php files but i really dont know what i am looking for :(

the attachment mod seems to be in my profile as well:

Upload Quota:
0
0% 50% 100%
[Uploaded: 0 Bytes / Quota: 50 MB / 0% of total]
User Attachment Control Panel

but by that i see that it doesnt recognise that i have attached anything?

u r being great and thanx so much, i look forward to your next reply :)

I was mentioning those two files so that maybe you can double-check that you did what was mentioned in install.txt correctly and didn't miss something. Sounds like you might be.
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17052
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: Can not view attachments in Aphrodite

Post by DavidIQ » Tue Dec 13, 2005 5:01 pm

catharsis3k wrote:
DavidIQ wrote:I don't know that it would matter but it should probably be this:

Code: Select all

 <div class="post-text">
{postrow.MESSAGE}<br /><br />
<span class="gensmall">{postrow.EDITED_MESSAGE}</span>
{postrow.ATTACHMENTS}
<span class="gensmall">{postrow.SIGNATURE}</span>
</div> 



you're right...it didn't do nothing

The Aphrodite style might not like how the viewtopic_attach_body.tpl file is designed. Maybe playing around with it a bit might get the box showing.
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.

Ripster1121
Registered User
Posts: 1
Joined: Tue Dec 13, 2005 4:57 pm

Post by Ripster1121 » Tue Dec 13, 2005 5:07 pm

I have added this mod to my forum just fine in SubSilver and I have now added it to Solaris but when you view the name of the file attached its very bright and impossible to read (note that solaris has a black background) so I was hoping someone could tell me how to change the color of the font/background. Just to clarify what i'm talking about its the filename directly above description (the very first thing after the separator).

catharsis3k
Registered User
Posts: 3
Joined: Tue Dec 13, 2005 4:08 pm

Re: Can not view attachments in Aphrodite

Post by catharsis3k » Tue Dec 13, 2005 5:14 pm

DavidIQ wrote: The Aphrodite style might not like how the viewtopic_attach_body.tpl file is designed. Maybe playing around with it a bit might get the box showing.


tried that too!

Do you know how I can print the content of the variable holding the attachment template ?

The last info I could track is this:

$template->assign_block_vars('postrow.attach.cat_images', array(
'DOWNLOAD_NAME' => $display_name,
'S_UPLOAD_IMAGE' => $upload_image,

'IMG_SRC' => $img_source,
'FILESIZE' => $filesize,
'SIZE_VAR' => $size_lang,
'COMMENT' => $comment,
'L_DOWNLOADED_VIEWED' => $lang['Viewed'],
'L_DOWNLOAD_COUNT' => sprintf($lang['Download_number'], $attachments['_' . $pos
t_id][$i]['download_count']))
);

$display_name, $upload_image, etc do have values and supposedly they get assigned..but what happens next ? I have no kloo!

Post Reply

Return to “[2.0.x] MOD Database Releases”