Moving Upload placement on Submit Step 2

Register an Account
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 05-13-2009, 10:55 AM
New Pligger
Pligg Template: wistie
 
Join Date: May 2009
Posts: 9
This post has short instructions on how to move the placement of the input area used by the Upload module in Submit Step 2 to a new right column. I moved it because it was confusing to see the options for uploading an image *before* the story title, description, etc. when people were not uploading an image.

Basically, what you will do is create two new column divs using css, place the main submit fields inside a left colum div, and place a custom module hook into the right column. Screenshot attached shows what it looks like.

CREATE CSS
Create two new div styles in style.css, one for a left column, one for a right column
For example, I used this css code:
Code:
.interiorLeftColumn{
float:left;
width:420px;
margin-right:35px;
font-family: Geneva, Arial, Helvetica, sans-serif;
line-height: 140%;
font-size:12px;
}

.interiorRightColumn{
float:left;
width:300px;
}
MODIFY SUBMIT STEP 2 FILE
1. open submit_step_2.tpl in your text editor
2. find <h2>{#PLIGG_Visual_Submit2_Details#}</h2>
3. place your new div tag *before* this line to define a left column (e.g., <div class="interiorLeftColumn">)
4. at the bottom of the file, find </form> (line break) </fieldset> - just before the double </div></div>
5. Place a closing </div> for your new left column div after </fieldset>
6. After that closing (but before the double </div>) add your new right column div opener (e.g., <div class="interiorRightColumn">)
7. Place a new custom module hook by simply entering into the next line the code with your custom hook name
e.g., {checkActionsTpl location="tpl_pligg_submit_step2_right"}
(note this is similar to other hooks used on this page, i simply changed the last word from "start" to "right")
8. Close your second new div with </div>
9. Save and upload.

MODIFY UPLOAD_INIT
1. In the modules/upload/ folder, open upload_init.php
2. Near the bottom, find module_add_action_tpl('tpl_pligg_submit_step2_star t', upload_tpl_path . '/upload_files.tpl');
3. This appears twice, once in the $include_in_pages = array('submit','story'); portion of the java, once in the $include_in_pages = array('editlink'); portion
4. change BOTH instances of
Code:
module_add_action_tpl('tpl_pligg_submit_step2_start', upload_tpl_path . '/upload_files.tpl');
to
Code:
module_add_action_tpl('tpl_pligg_submit_step2_right', upload_tpl_path . '/upload_files.tpl');
5. Save and upload.

That should do it!

**Note, I tried to simply change the hook label in upload_init.php to an existing hook ('tpl_pligg_submit_step2_middle') but it broke the submit button function. This is, yankidank very kindly told me, because the upload module must be placed *outside* the <form> fields. The start hook is the only one currently there that does so. So a new hook is required.
Attached Thumbnails
Moving Upload placement on Submit Step 2-uploadplacement.jpg  
Reply With Quote
  #2 (permalink)  
Old 05-13-2009, 12:23 PM
New Pligger
Pligg Version: 1 rc4
 
Join Date: Apr 2009
Posts: 9
Thank you for sharing pligg needs people like you!
Reply With Quote
  #3 (permalink)  
Old 05-20-2009, 12:48 AM
iwans's Avatar
New Pligger
 
Join Date: Apr 2009
Posts: 7
This is support rc5
Reply With Quote
Reply

Tags
customization, module, placement, submit step 2, upload

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto submit story on submit step 3 for god only gnalkit Questions and Comments 3 03-30-2011 01:09 AM
Skip submit step 3 for god gnalkit Questions and Comments 3 05-12-2009 05:22 AM
duplicate news items and lost data in submit step 2 malexs Questions and Comments 3 05-05-2009 05:32 PM
how to upload file submit story step 1 page? ffarhann Questions and Comments 1 12-18-2007 02:32 AM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development