Go Back   Pligg CMS Forum > Pligg Development > Modification Tutorials

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-23-2008, 09:14 PM
New Pligger
 
Join Date: Jul 2007
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
Image_Upload with beta 9.9 - fix

I just spent a few minutes getting the image_upload working with beta 9.9.. here's what I did.

http://forums.pligg.com/downloads.php?do=file&id=36

Code:
1) Edit: /templates/(your template)/submit_step_2.tpl

I didnt have to alter the <form> tag as the orignal installation instructions noted.

After line #94 (), add the following:
{php}
$vars2 = '';
check_actions('image_upload_form', $vars2);
{/php}

2) Edit: /templates/(your template)/submit_step_3.tpl

add the following right after line 1 (<h2>{#PLIGG_Visual_Submit3_Header#}</h2>)

{php}
$vars2 = '';
check_actions('image_upload_process', $vars2);
{/php}

3) Edit: /templates/(your template)/link_summary.tpl

after line 261 (), add the following:

{php}
$vars2 = '';
check_actions('image_upload_preview', $vars2);
{/php}

4) Edit: /templates/(your template)/editlink_edit_center.tpl

change the <form> tag as indicated by the orignal install document:

<form action="" method="post" id="thisform">
- Change it to -
<form action="" method="post" id="thisform" enctype="multipart/form-data">

add the following code after line 101 ({include file=$tpl_extra_fields.".tpl"})

{php}
$vars2 = '';
check_actions('image_upload_preview', $vars2);
{/php}

5) Edit: /editlink.php

Add the following code after like #125 ($linkres->store())

$vars2 = '';
check_actions('image_upload_process', $vars2);

6) Fix the smarty template errors in image_upload_main

Now, goto your image_upload directory and edit image_upload_main.php

When you run this, you'll get quite a few errors indicating geT_template_vars doesnt exist. you'll need to change $smart->get_template_vars to $main_smart->get_template_vars whereever you see the error pop up. thats all.

Now this isnt of much use to me, what I need is a generic file attachment functionality. If anyone knows of any modules that will do this for me, then let me know please. Otherwise i'm getting ready to turn this module into a generic file attachment module..

feedback appreciated. I hope this helps someone.

-js
Reply With Quote
The Following User Says Thank You to jsidhu For This Useful Post:
  #2 (permalink)  
Old 07-23-2008, 10:05 PM
chuckroast's Avatar
Coder/Designer
Pligg Version: 1.0
Pligg Template: ExpertVision
 
Join Date: Jun 2006
Location: PA
Posts: 2,399
Thanks: 171
Thanked 439 Times in 278 Posts
Quote:
Originally Posted by jsidhu View Post
If anyone knows of any modules that will do this for me, then let me know please. Otherwise i'm getting ready to turn this module into a generic file attachment module..
Try here
http://forums.pligg.com/pligg-mods/7...g-testers.html
__________________
Visit PliggPro the official Pligg Mods & Template Shop!

Reply With Quote
  #3 (permalink)  
Old 08-27-2008, 03:39 PM
New Pligger
 
Join Date: Aug 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Do not understand what it can be...
UPLOAD - works, but in SUBMIT3 the path and filename are incorrect.
Please look at the debug mode info in Submit3 Step:

START: image_upload_process_handler.
Original image filename = 789.jpg
Temp image filename = D:\EasyPHP2\\tmp\php50.tmp
Link ID = 19
Raw File size = 21258
Formatted File size = 21.3 kb
Max allowed file size = 2000000
Max allowed image x height = 1200x1200
Destination file = img_19
Destination path = D:/EasyPHP2/www/images/
Image data = 340x255 (image/jpeg)
No image conversion necessary.
Checking image dimensions for possible resizing.
Updating database with image filename.
Database updated.
END: image_upload_process_handler.


START: image_upload_preview_handler
Story ID =
Image Path = D:/EasyPHP2/www/images/img_.jpg
Possible Image File = img_.jpg
Image Caption =
No image found to display.
END: image_upload_preview_handler
Reply With Quote
  #4 (permalink)  
Old 09-02-2008, 06:49 AM
New Pligger
 
Join Date: Jul 2007
Posts: 26
Thanks: 3
Thanked 0 Times in 0 Posts
thanks for updating and it is really working
__________________
http://www.uip.in/
Reply With Quote
  #5 (permalink)  
Old 09-02-2008, 07:25 AM
Constant Pligger
Pligg Version: 9.8
Pligg Template: garx mod
 
Join Date: Oct 2006
Location: Poland
Posts: 134
Thanks: 11
Thanked 6 Times in 5 Posts
im loooking for image upload modul for user profiles, is there any geek :P who can make me happy?
Reply With Quote
  #6 (permalink)  
Old 09-03-2008, 10:07 AM
lochoe's Avatar
New Pligger
Pligg Version: 9.9.5
Pligg Template: pliggedblue
 
Join Date: Aug 2008
Location: kuala lumpur
Posts: 24
Thanks: 1
Thanked 2 Times in 2 Posts
Send a message via Yahoo to lochoe
3) Edit: /templates/(your template)/link_summary.tpl

after line 261 (), add the following:

{php}
$vars2 = '';
check_actions('image_upload_preview', $vars2);
{/php}


if i already edit some part of the script, where should i put this, i dont get line 261, please help me :-(
Reply With Quote
  #7 (permalink)  
Old 09-11-2008, 05:19 AM
New Pligger
 
Join Date: Jul 2007
Posts: 26
Thanks: 3
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by lochoe View Post
3) Edit: /templates/(your template)/link_summary.tpl

after line 261 (), add the following:

{php}
$vars2 = '';
check_actions('image_upload_preview', $vars2);
{/php}


if i already edit some part of the script, where should i put this, i dont get line 261, please help me :-(
you add this at the end of your page
__________________
http://www.uip.in/
Reply With Quote
Reply

Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
Pligg Beta 9.9.0 chuckroast Current Version 1 01-01-2008 09:07 PM
Beta, beta, beta. Still beta? Andre Installation and Upgrade Help 1 10-19-2007 06:22 AM
Problem with Upgrading from Pligg beta 9.0 to 9.5 rhythm Installation and Upgrade Help 9 05-09-2007 12:08 PM
Beta 9.1 vs Beta 9.0 707 - What changed? Sinsinnati Installation and Upgrade Help 2 02-19-2007 09:53 PM
Pligg Beta 4 Yankidank Current Version 0 12-29-2005 08:09 AM


Search Engine Friendly URLs by vBSEO 3.2.0