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

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

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

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

User avatar
DavidIQ
Site Admin
Posts: 581
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Re: Attachment preview problem

Post by DavidIQ » Sun Nov 04, 2007 9:27 pm

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

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.

User avatar
DavidIQ
Site Admin
Posts: 581
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Re: Attachment preview problem

Post by DavidIQ » Wed Nov 07, 2007 7:34 am

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

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

User avatar
DavidIQ
Site Admin
Posts: 581
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Re: Attachment preview problem

Post by DavidIQ » Wed Nov 07, 2007 12:49 pm

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

ok david. i have removed all javascripts that reason for slowness.You could join and try to post .

User avatar
DavidIQ
Site Admin
Posts: 581
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Re: Attachment preview problem

Post by DavidIQ » Thu Nov 08, 2007 12:17 am

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 » Thu Nov 08, 2007 3:46 am

ok.i have sent it.
Attachments
functions_post.rar
(9.02 KiB) Downloaded 366 times

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

Re: Attachment preview problem

Post by streamino » Sun Nov 11, 2007 12:00 pm

hi david,did you have any chance to look at the code of the includes/functions_post.php ?.

User avatar
DavidIQ
Site Admin
Posts: 581
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Re: Attachment preview problem

Post by DavidIQ » Sun Nov 11, 2007 2:46 pm

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

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') 

User avatar
DavidIQ
Site Admin
Posts: 581
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Re: Attachment preview problem

Post by DavidIQ » Sun Nov 11, 2007 5:31 pm

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

Who is online

Users browsing this forum: No registered users and 1 guest