Page 1 of 2

Attachment preview problem

Posted: Tue Oct 30, 2007 10:54 am
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

Re: Attachment preview problem

Posted: Thu Nov 01, 2007 12:26 am
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.

Re: Attachment preview problem

Posted: Thu Nov 01, 2007 7:20 am
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

Re: Attachment preview problem

Posted: Sun Nov 04, 2007 9:27 pm
by DavidIQ
If you edit a message that's supposed to have an attachment in it can you see the attachment there?

Re: Attachment preview problem

Posted: Wed Nov 07, 2007 4:57 am
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.

Re: Attachment preview problem

Posted: Wed Nov 07, 2007 7:34 am
by DavidIQ
Can you post a URL to your site?

Re: Attachment preview problem

Posted: Wed Nov 07, 2007 12:30 pm
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

Re: Attachment preview problem

Posted: Wed Nov 07, 2007 12:49 pm
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.

Re: Attachment preview problem

Posted: Wed Nov 07, 2007 12:51 pm
by streamino
ok david. i have removed all javascripts that reason for slowness.You could join and try to post .

Re: Attachment preview problem

Posted: Thu Nov 08, 2007 12:17 am
by DavidIQ
I think I see where the problem is. Send me your includes/functions_post.php file.

Re: Attachment preview problem

Posted: Thu Nov 08, 2007 3:46 am
by streamino
ok.i have sent it.

Re: Attachment preview problem

Posted: Sun Nov 11, 2007 12:00 pm
by streamino
hi david,did you have any chance to look at the code of the includes/functions_post.php ?.

Re: Attachment preview problem

Posted: Sun Nov 11, 2007 2:46 pm
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.

Re: Attachment preview problem

Posted: Sun Nov 11, 2007 4:00 pm
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') 

Re: Attachment preview problem

Posted: Sun Nov 11, 2007 5:31 pm
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...