Attachment preview problem

Since Opentools.de has now gone away I've created this forum to house FAQs and support for this mod in phpBB2.

Moderator: Experts

streamino
Posts: 15
Joined: Tue Oct 30, 2007 10:45 am

Attachment preview problem

Post by streamino »

i could upload an attachment file when i have posted a message and also preview it but when i have posted and submit it i cant see my attached files in my forum.it hadnt been to attached in my message ..How could i fix this problem ..may be it's about a sql problem or about .tpl file

i have to edit viewtopic.php and also viewtopic_body.tpl but how ? and also i have suspect about these files ;-posting_topic_review.tpl ,posting_preview.tpl


i have sended you to my files about this prolem

i have listed the files that will be included in my rar ;(i have edited all modificiations that the install txt told about ..these files are edited ones..)

attachment mod install.txt

-viewtopic.php
viewtopic_body.tpl
viewforum_body.tpl
posting.php
functions.php
Attachments
sitedeki.rar
(46.25 KiB) Downloaded 693 times
Last edited by streamino on Wed Nov 07, 2007 12:39 pm, edited 2 times in total.
anax
Posts: 4
Joined: Tue Oct 30, 2007 9:03 pm

Re: Attachment preview problem

Post by anax »

if you could help me about this issue i will be so glad
... just what is the issue?
i have to edit viewtopic.php and also viewtopic_body.tpl but how
... just open them in Notepad or Dreamweaver.
streamino
Posts: 15
Joined: Tue Oct 30, 2007 10:45 am

Re: Attachment preview problem

Post by streamino »

i could upload an attachment file when i have posted a message and also preview it but when i have posted and submit it i cant see my attached files in my forum.it hadnt been to attached in my message ..How could i fix this problem ..may be it's about a sql problem or about .tpl file
DavidIQ
Site Admin
Posts: 619
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Re: Attachment preview problem

Post by DavidIQ »

If you edit a message that's supposed to have an attachment in it can you see the attachment there?
streamino
Posts: 15
Joined: Tue Oct 30, 2007 10:45 am

Re: Attachment preview problem

Post by streamino »

i dont realy understand about but i will try to explain.when i have uploaded the files with attachment and then preview it ,everythings fine ..but when i submited ,it couldn't be in my message at the viewtopic and also when i want to edited the attachment message in viewtopic i couldn't find my attachments too.it has shown only my posts in the message not my attachments.
DavidIQ
Site Admin
Posts: 619
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Re: Attachment preview problem

Post by DavidIQ »

Can you post a URL to your site?
streamino
Posts: 15
Joined: Tue Oct 30, 2007 10:45 am

Re: Attachment preview problem

Post by streamino »

also david ;

http://www.muhendisiz.net

and i have created a forum only for your join and test.also created a nickname and password.

İ sent your nickname/password to you with private message as you accept for security :)


This is your forum to test and post a message ; http://www.muhendisiz.net/viewforum.php?f=134
DavidIQ
Site Admin
Posts: 619
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Re: Attachment preview problem

Post by DavidIQ »

You have heavy javascript on your site which disables my browser menu and most likely disables the browsing feature since that's not doing anything when I click on the Browse buttons for both ImageShack and attachment mod.
streamino
Posts: 15
Joined: Tue Oct 30, 2007 10:45 am

Re: Attachment preview problem

Post by streamino »

ok david. i have removed all javascripts that reason for slowness.You could join and try to post .
DavidIQ
Site Admin
Posts: 619
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Re: Attachment preview problem

Post by DavidIQ »

I think I see where the problem is. Send me your includes/functions_post.php file.
streamino
Posts: 15
Joined: Tue Oct 30, 2007 10:45 am

Re: Attachment preview problem

Post by streamino »

ok.i have sent it.
Attachments
functions_post.rar
(9.02 KiB) Downloaded 716 times
streamino
Posts: 15
Joined: Tue Oct 30, 2007 10:45 am

Re: Attachment preview problem

Post by streamino »

hi david,did you have any chance to look at the code of the includes/functions_post.php ?.
DavidIQ
Site Admin
Posts: 619
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Re: Attachment preview problem

Post by DavidIQ »

Open your functions_post.php file and do the following:

Code: Select all

#
#---- [FIND] ----
#
redirect(append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id, true);

#
#---- [BEFORE, ADD] ----
#
$attachment_mod['posting']->insert_attachment($post_id);
That should do it.
streamino
Posts: 15
Joined: Tue Oct 30, 2007 10:45 am

Re: Attachment preview problem

Post by streamino »

i have got this error ;

Fatal error: Call to a member function on a non-object in /home/muheznet/domains/muhendisiz.net/public_html/includes/functions_post.php on line 518

line 518 include your fix code ($attachment_mod['posting']->insert_attachment($post_id);
)

it's my code at the function_post near the 518 lines ;

Code: Select all

asort($tracking_topics); 
unset($tracking_topics[key($tracking_topics)]); 
} 

$tracking_topics[$topic_id] = time(); 

setcookie($board_config['cookie_name'] . '_t', serialize($tracking_topics), 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']); 
} 
$attachment_mod['posting']->insert_attachment($post_id);
redirect(append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id, true); 

if ( $mode != 'editpost' ) 
{ 
$user_id = ( $mode == 'reply' || $mode == 'newtopic' ) ? $userdata['user_id'] : $post_data['poster_id']; 
update_post_stats($mode, $post_data, $forum_id, $topic_id, $post_id, $user_id); 
} 

if ($error_msg == '' && $mode != 'poll_delete') 
DavidIQ
Site Admin
Posts: 619
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Re: Attachment preview problem

Post by DavidIQ »

Ok...then undo that change and remove this from your functions_post.php file:

Code: Select all

redirect(append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id, true);
In your posting.php file do the following:

Code: Select all

#
#---- [FIND] ----
#
$attachment_mod['posting']->insert_attachment($post_id);

#
#---- [AFTER, ADD] ----
#
redirect(append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id, true);
THAT should do it now...
Locked