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

Attachment preview problem

Postby 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 45 times
Last edited by streamino on Wed Nov 07, 2007 1:39 pm, edited 2 times in total.
streamino
 
Posts: 15
Joined: Tue Oct 30, 2007 10:45 am

Re: Attachment preview problem

Postby 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.
anax
 
Posts: 4
Joined: Tue Oct 30, 2007 9:03 pm

Re: Attachment preview problem

Postby 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
streamino
 
Posts: 15
Joined: Tue Oct 30, 2007 10:45 am

Re: Attachment preview problem

Postby DavidIQ » Sun Nov 04, 2007 10:27 pm

If you edit a message that's supposed to have an attachment in it can you see the attachment there?
User avatar
DavidIQ
 
Posts: 505
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth

Re: Attachment preview problem

Postby streamino » Wed Nov 07, 2007 5: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.
streamino
 
Posts: 15
Joined: Tue Oct 30, 2007 10:45 am

Re: Attachment preview problem

Postby DavidIQ » Wed Nov 07, 2007 8:34 am

Can you post a URL to your site?
User avatar
DavidIQ
 
Posts: 505
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth

Re: Attachment preview problem

Postby streamino » Wed Nov 07, 2007 1: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
streamino
 
Posts: 15
Joined: Tue Oct 30, 2007 10:45 am

Re: Attachment preview problem

Postby DavidIQ » Wed Nov 07, 2007 1: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.
User avatar
DavidIQ
 
Posts: 505
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth

Re: Attachment preview problem

Postby streamino » Wed Nov 07, 2007 1:51 pm

ok david. i have removed all javascripts that reason for slowness.You could join and try to post .
streamino
 
Posts: 15
Joined: Tue Oct 30, 2007 10:45 am

Re: Attachment preview problem

Postby DavidIQ » Thu Nov 08, 2007 1:17 am

I think I see where the problem is. Send me your includes/functions_post.php file.
User avatar
DavidIQ
 
Posts: 505
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth

Re: Attachment preview problem

Postby streamino » Thu Nov 08, 2007 4:46 am

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

Re: Attachment preview problem

Postby streamino » Sun Nov 11, 2007 1:00 pm

hi david,did you have any chance to look at the code of the includes/functions_post.php ?.
streamino
 
Posts: 15
Joined: Tue Oct 30, 2007 10:45 am

Re: Attachment preview problem

Postby DavidIQ » Sun Nov 11, 2007 3: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.
User avatar
DavidIQ
 
Posts: 505
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth

Re: Attachment preview problem

Postby streamino » Sun Nov 11, 2007 5: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')
streamino
 
Posts: 15
Joined: Tue Oct 30, 2007 10:45 am

Re: Attachment preview problem

Postby DavidIQ » Sun Nov 11, 2007 6: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...
User avatar
DavidIQ
 
Posts: 505
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth

Next

Return to Legacy Attachment MOD Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron