Go Back   Pligg CMS Forum > Pligg Development > Modification Tutorials

Reply
 
LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 06-22-2007, 08:59 PM
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,071
Thanks: 53
Thanked 25 Times in 23 Posts
Iīve tried to do the same changes an in an earlier verson of Image Upload:

./lib/extra_fields.php:

define('Enable_Extra_Field_1', true);
define('Field_1_Title', 'Choose a file:');
define('Field_1_Instructions', 'Valid formats are .... .');


./templates/yget/submit_extra_fields.tpl:

{if $Enable_Extra_Field_1 eq 1}
<p><label>{$Field_1_Title}:</label>{$Field_1_Instructions}<br />
<input type="file" name="link_field1" id="link_field1" size="20" class="form-full" />
</p>

Once again, without success.
Reply With Quote
  #12 (permalink)  
Old 06-23-2007, 03:58 AM
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,071
Thanks: 53
Thanked 25 Times in 23 Posts
I´ve learned from Image Upload Module that these files musn´t be changed with v1.0 code base. So I guess it must be a difference between v9.5 and v9.6 that causes the non-appreance of the input field .

Edit: I remember I´ve tested Image Upload v0.4. I couldn´t find the description anymore what to change so maybe some changed lines of code interfere with the File Upload code.

Last edited by tbones; 06-23-2007 at 04:26 AM.. Reason: Code interference with Image Upload v0.4
Reply With Quote
  #13 (permalink)  
Old 06-23-2007, 04:59 AM
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,071
Thanks: 53
Thanked 25 Times in 23 Posts
I donīt know what happened but it works now up to

Parse error: syntax error, unexpected '<' in /srv/www/class.template.php(745) : eval()'d code on line 103

instead of submit step 3.

Additionally, it get the sidebar headline "(value of) PLIGG_Visual_Top_Stories_In 1" where "(value of) PLIGG_Visual_Top_Stories_In" should be. I have now clue under which circumstances this headline should appear so it could be a general Pligg problem.

An alternative (and reproducible) behaviour is to show a page without sidebar modules and the message

Parse error: syntax error, unexpected '<' in /srv/www/templates_c/c_bbd25c3beba9b5bf5731211a1a9ab665.php on line 103
Reply With Quote
  #14 (permalink)  
Old 06-23-2007, 10:26 AM
cent's Avatar
Constant Pligger
 
Join Date: Jan 2007
Location: New York, NY
Posts: 183
Thanks: 24
Thanked 65 Times in 26 Posts
Hi tbones,

If you've enabled the module in the Admin -> Modules section and placed the check_actions block in submit_step_2.tpl and the rest of the files, you should see an upload form. Please double-check that you've enabled the module in the admin area.

Best,
Cent

Quote:
Originally Posted by tbones View Post
Iīve tried to install with v9.5:

- Iīve copied the subfolder file_upload to ./modules
- Iīve changed to <form action="{$URL_submit}" method="post" name="thisform" id="thisform" enctype="multipart/form-data"> at submit_step2.tpl
- Iīve placed the code above <div class="top"> at editlink.php
- Iīve activated the module Profile Extra Fields v0.2

and did the rest as mentioned in Readme.

Result: I donīt get any extra field. Does it have to be defined somewhere?


Edit: I left ./modules/file_upload/file_upload_settings.php untouched.
__________________
All of my modules are developed for free to help support the Pligg community. If you use or feel my modules were helpful to your site and want to thank me, please support the Pligg development team by donating.

Modules: Welcome Private Message (v0.1), Welcome Email (v0.1), Thickbox Module (v0.3), Image Upload (v1.0) & MP3 Upload Module (v0.9)
Reply With Quote
  #15 (permalink)  
Old 06-23-2007, 10:31 AM
cent's Avatar
Constant Pligger
 
Join Date: Jan 2007
Location: New York, NY
Posts: 183
Thanks: 24
Thanked 65 Times in 26 Posts
I would also try removing all of the files in the templates_c directory.
__________________
All of my modules are developed for free to help support the Pligg community. If you use or feel my modules were helpful to your site and want to thank me, please support the Pligg development team by donating.

Modules: Welcome Private Message (v0.1), Welcome Email (v0.1), Thickbox Module (v0.3), Image Upload (v1.0) & MP3 Upload Module (v0.9)
Reply With Quote
  #16 (permalink)  
Old 06-23-2007, 12:38 PM
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,071
Thanks: 53
Thanked 25 Times in 23 Posts
Quote:
Originally Posted by cent View Post
I would also try removing all of the files in the templates_c directory.
There a lot of files there! My pligg hasnīt gone online so far so I wonder whether I have to delete the templates_c files manually every day when the users start submitting and commenting.

For some I reason I couldnīt find the module in the module management but now Iīve found and activated it. Iīve checked all changes to the files twice and deleted the templates_c files.

The extra field has been visible before but when I click the button "Preview and Submit" this error appears reproducibly:

Parse error: syntax error, unexpected '<' in /srv/www/class.template.php(745) : eval()'d code on line 103

plus the error at the sidebar module (see above).

Do you have any clue where the file class.template.php is?


Edit: No relevant information when running in debug mode.

Last edited by tbones; 06-23-2007 at 03:32 PM.. Reason: No extra information through debug mode
Reply With Quote
  #17 (permalink)  
Old 06-29-2007, 12:34 PM
New Pligger
 
Join Date: Jun 2007
Posts: 12
Thanks: 3
Thanked 1 Time in 1 Post
Quote:
Do you have any clue where the file class.template.php is?
It should be in the root directory of pligg.

I've also have a question regarding the file upload module. I have both the file upload and image upload installed currently. Cent, you mentioned something about changing the link_field1 variable so they would not conflict. Can you tell me how I can go about doing that? I seem to get stuck at the 3rd Submit screen (it's completely blank).
Reply With Quote
  #18 (permalink)  
Old 06-29-2007, 07:03 PM
New Pligger
 
Join Date: Jun 2007
Posts: 12
Thanks: 3
Thanked 1 Time in 1 Post
Nevermind. Got it working now. The only concern I have is that the module created the file_xx.dat before the user actually confirms the submit. Is there a way to not have the module create this file until after the user confirms the submission?
Reply With Quote
  #19 (permalink)  
Old 06-30-2007, 05:45 AM
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,071
Thanks: 53
Thanked 25 Times in 23 Posts
What version do you use twinkiboy?
Reply With Quote
  #20 (permalink)  
Old 07-02-2007, 12:25 PM
New Pligger
 
Join Date: Jun 2007
Posts: 12
Thanks: 3
Thanked 1 Time in 1 Post
I'm using " v0.1 2007/06/19 Cent - First version." Now another error's cropped up. For some reason, I can't access the uploaded files anymore. I can go through the upload process alright. But when I try to click on a submitted file, I just see a blank page.
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
[MOD] Image Upload Module (v0.93) -- Please test cent Modification Tutorials 48 05-16-2008 08:08 PM
[MOD] MP3 Upload Module cent Modification Tutorials 32 03-02-2008 03:07 AM
[MOD] File Upload Module for 9.8.2 Is here for download :) Redux Modification Tutorials 7 01-27-2008 08:21 AM
[MOD] 9.8.2 File Upload Working Redux Modification Tutorials 1 12-30-2007 07:53 PM
[MOD] File Upload Module -- seeking requests for features cent Modification Tutorials 3 08-11-2007 04:39 AM


Search Engine Friendly URLs by vBSEO 3.2.0