If you are new to PowerSeek then it would be best to first get familiar with the template system. First customize the look and feel of your Search Engine & Directory and then come back to enable image uploading. You can find out how to customize the look and feel of your search engine by clicking here. First customizing the look and feel of your Search Engine will help you understand the terms and instructions below much easier as you will be familiar with the template system.
To let visitors upload an image with their link submission follow the following steps:
Important Note: The instructions below are only suited if you would like visitors to upload one image with their link listing. By default PowerSeek comes with one image upload field. If you would like to display multiple images with link listings and have users upload multiple images when submitting a listing then follow these instructions.
Step 1 - Image Upload Settings
Go to the Powerseek Control Panel >> Settings >> Global Engine Settings >> 3. Directory/Category Listing Settings
Look for a settings that reads:
If you are using an uploaded image with link listings and there is no image for the link listing then you can specify the path to a default image that will display: (Leaving it blank will results in nothing being displayed)
If you would like to display a default image with link listings that has no image then provide the path to the image here.
Would you like uploaded images displayed with link listings to have a fixed width and height? If so then please supply the width and height. If not then set the values to be zero.
Here you can set a fixed width and height for all uploaded images with link listings.
Enable image uploading from submission forms?
If you want visitors to be able to upload images with their submissions then set this setting to 'Yes'.
What is the maximum size of an image file that may be uploaded?
Images exceeding this size will not be accepted.
Step 2 - Edit Add URL forms to include an Upload Field
Go to the Powerseek Control Panel >> Template Manager >> 3. Add URL Templates. These are the forms that is displayed to visitors when they need to enter their link details to do a submission.
Open the Add URL forms for standard and premium links. Look at the source of the form and find the form declaration. It will look something like this:
<form method="POST" action="!!addurlcgi!!">
Modify it so that it looks like this:
<form method="POST" action="!!addurlcgi!!" ENCTYPE="multipart/form-data">
You need to modify the form declaration to indicate that we are now also accepting a file to be uploaded. The part you add to the form declaration is: ENCTYPE="multipart/form-data"
Now add the following to the Add URL form: (This is the upload field that visitors will see when submitting a link)
Upload an image: <input type="file" name="image" size="51">
You may click this link to see an example of how an Add URL template with upload field looks like.
Step 3 - Edit Modify forms to include an Upload Field
Go to the Powerseek Control Panel >> Template Manager >> 3. Add URL Templates >> Edit the 'Modify Link Standard' and 'Modify Link Premium' templates and add the following to both templates:
Like in step 2 modify the form declaration of both templates. Change the line reading:
<form method="POST" action="!!modify_cgi!!">
Change it so that it looks like this:
<form method="POST" action="!!modify_cgi!!" ENCTYPE="multipart/form-data">
Now add the following code inside the form:
%%image%% [imgtext]No Image Available[endimgtxt]
In the line above %%image%% is replaced by a previously uploaded image. The text between the [imgtext] and [/endimgtxt] tags will be displayed if no image is available for the link. If an image is available then this text won't be displayed. You can also specify your own text between the [imgtext] and [/endimgtxt] tags. (It is customizable)
Now also add the following to the form:
[delbtext]Delete Image?[enddelbtext] %%delete_checkbox%%
In the line above the text between [delbtext] and [enddelbtext] will be displayed when an image is available for the link. You can customize this text by specifying your own text. (between the [delbtext] and [enddelbtext] tags). The %%delete_checkbox%% is replaced by a checkbox that users modifying their links can check if they want to remove the image from their listing.
Now also add the following to the form:
Now add the following to the form as well: (This is the upload field that visitors will see when modifying their link to be able to upload a new image and replace the old image)
Upload an image: <input type="file" name="image" size="51">
You may click this link to see an example of how a Modify template with upload field looks like.
Step 4 - Customizing link style templates
This section explains how to include uploaded images with links. (when visitors are browsing categories or searching for links, etc.) To include images with links that users uploaded do the following:
Go to the Powerseek Control Panel >> Settings >> Template Manager
Edit the following templates: tmplsearch.html, tmplsearch_prem.html, linkinfo.html, linkinfop.html, lsearchres_loc.html, lsearchres_loc_prem.html, whatsnew_lists.html, whatsnew_lists_prem.html,
tophits_listings.html, tophits_listings_prem.html
The above mentioned templates are all link style templates. It defines how link listings will look like when they are displayed.
To each template add the variable word !!link_image!! - This word will be replaced by the uploaded image for links. If the link has no image and you chose to have a default image displayed in the settings as explained in step 2 above then the default image will display. If no default image was specified then nothing will display.
After you added this 'Upload Field', add as many 'Upload Fields' for the image uploads you require.
To display the image files in link listings go to the:
Control Panel >> Template Manager >> 1. Default Category/Directory Templates >> Link Style
Edit the 'Link Style' template and include the 'Upload Field Name' where you want the image to display. In this example we will display the image contained in the 'image1' 'upload field' we just created. We will then add image1 (the word image1) to the link style template to display an image with link listings if available. If you added more than one 'upload field' for images then also place the names of the 'upload fields' for the other images inside this template.
You can also do the same with the 'Premium Link Style' template as explained above to display images with 'Premium Links'.
To display the image files on the 'more info' pages of link listings go to the:
Control Panel >> Template Manager >> 1. Default Category/Directory Templates >> Link Info
Edit the template and place !!image1!! where you would like to display the Image file of the field 'image1' if an image is available with a listing. Remember that in this example we added an extra field with the name image1. If you added more than one 'upload field' for images then also place the names of the 'upload fields' for the other images inside this template.
You can also do the same with the 'Link Info Premium' template as explained above to display images on the 'more info' pages of 'Premium Links'.
If you would like to have end users upload images with their link listings then you will need to edit the 'Add URL' and 'Modify' templates. To do this, do the following:
Go to the Control Panel >> Template Manager >> 3. Add URL Templates
Edit the 'Standard' or 'Premium' Add URL template that is displayed to an end user doing a New Submission. This template contains the fill-in-boxes to supply a Title, Description, etc. for their listing.
Look at the HTML source code of the templates 'Add URL' templates (Premium or Standard)' and find the form declaration. It will look something like this:
<form method="POST" action="!!addurlcgi!!">
Modify it so that it looks like this:
<form method="POST" action="!!addurlcgi!!" ENCTYPE="multipart/form-data">
Inside the 'Add URL' templates (Premium or Standard) add the following: (within the scope of the Add URL form)
Image Upload: <input type="file" name="image1" size="20">
Remember that in this example we added an extra field with the name image1.
Note that when editing the 'Add URL' templates that you can click on 'Explanation of Variables Used Inside This Template' for an exaplanation of the variables available inside the template. It will also provide instructions on how to implement extra fields including 'extra upload fields'
To implement the ability to modify a listing containing image files, edit the 'Modify' templates. To do this go to the:
Control Panel >> Template Manager >> 3. Add URL Templates
Now edit the Modify templates (Standard or Premium) that is responsible for displaying the link listing details like the title, description, URL, etc. when an end user chooses to modify a listing.
Look at the HTML source code of the modify templates (Premium or Standard) and find the form declaration. It will look something like this:
<form method="POST" action="!!modify_cgi!!">
Modify it so that it looks like this:
<form method="POST" action="!!modify_cgi!!" ENCTYPE="multipart/form-data">
Add the following to the modify templates (Premium or Standard):
%%image1_file_with_link%%
[image1_no_filename_text]No File Available [image1_no_filename_text_end]
<br> <input type="file" name="image1" size="20"><br>
[image1_del_text]Delete File? [image1_del_text_end] %%image1_checkbox%%
Explanation of the HTML code above:
%%image1_file_with_link%%
This is replaced by a link to the image file.
[image1_no_filename_text]No File Available [image1_no_filename_text_end]
If no file was uploaded yet then the 'No File Available' text will be displayed. You can customize this text to your own words.
<br> <input type="file" name="image1" size="20"><br>
This displays a field with a 'Browse' button to upload a new image file.
[image1_del_text]Delete File? [image1_del_text_end] %%image1_checkbox%%
This provides an option to Delete the current uploaded file with a checkbox. Note that this option will only be displayed if it is not required that the end user provides a file upload. If you are requiring end users to do an image file upload with their new submission then this option won't be available because it will give them the ability to delete the image file that was already uploaded. Note that in this situation that end users can always replace an existing file with a new one.
Remember that in this example we added an extra field with the name image1. You can follow the instructions in this 'howto' to implement the display and Uploading/Modifying of each extra upload field you created.
Note that when editing the 'Modify' templates that you can click on 'Explanation of Variables Used Inside This Template' for an exaplanation of the variables available inside the template. It will also provide instructions on how to implement extra fields including upload fields for modification.
Additional Notes:
Note that you can display the images in other templates as well. The other templates where images can be displayed are under the:
Control Panel >> Template Manager >> 2. Search Result Templates >> Links Style (lsearchres_loc.html) and Premium Links Style (lsearchres_loc_prem.html)
Control Panel >> Template Manager >> 3. Add URL Templates >> Account Links Style (rgs_acclinks.html) and Account Premium Links Style (rgs_acclinksp.html)
Control Panel >> Template Manager >> 4. Rating Templates >> Main Rating Page (rate_it.html)
Control Panel >> Template Manager >> 5. Comment/Review Templates >> Main Comment/Review Page (review_it.html)
Control Panel >> Template Manager >> 6. What's New Templates >> What's New Listings Style (whatsnew_lists.html) and What's New Listings Premium Style (whatsnew_lists_prem.html)
Control Panel >> Template Manager >> 7. Top Hits Templates >> Top Hits Listings Style (tophits_listings.html) and Top Hits Listings Premium Style (tophits_listings_prem.html)
Control Panel >> Template Manager >> 9. Favorites >> Favorites Link Style (fav_standard.html) and Favorites Premium Link Style fav_premium.html)
To display the Video files on the 'more info' pages of link listings go to the:
Control Panel >> Template Manager >> 1. Default Category/Directory Templates >> Link Info
Edit the template and place !!vupload!! where you would like to display the Video if a video is available with a listing. Remember that in this example we added an extra field with the name vupload.
If you would like to have end users upload videos with their link listings then you will need to edit the 'Add URL' and 'Modify' templates. To do this, do the following:
Go to the Control Panel >> Template Manager >> 3. Add URL Templates
Edit the 'Standard' or 'Premium' Add URL template that is displayed to an end user doing a New Submission. This template contains the fill-in-boxes to supply a Title, Description, etc. for their listing.
Look at the HTML source code of the templates 'Add URL' templates (Premium or Standard) and find the form declaration. It will look something like this:
<form method="POST" action="!!addurlcgi!!">
Modify it so that it looks like this:
<form method="POST" action="!!addurlcgi!!" ENCTYPE="multipart/form-data">
Inside the 'Add URL' templates (Premium or Standard) add the following: (within the scope of the Add URL form)
Video Upload: <input type="file" name="vupload" size="20">
Note that when editing the 'Add URL' templates that you can click on 'Explanation of Variables Used Inside This Template' for an exaplanation of the variables available inside the template. It will also provide instructions on how to implement extra fields.
To implement the ability to modify a listing containing a video, edit the 'Modify' templates. To do this go to the:
Control Panel >> Template Manager >> 3. Add URL Templates
Now edit the Modify templates (Standard or Premium) that is responsible for displaying the link listing details like the title, description, URL, etc. when an end user chooses to modify a listing.
Look at the HTML source code of the templates 'Add URL' templates (Premium or Standard) and find the form declaration. It will look something like this:
<form method="POST" action="!!addurlcgi!!">
Modify it so that it looks like this:
<form method="POST" action="!!addurlcgi!!" ENCTYPE="multipart/form-data">
Now add the following to the modify template:
%%vupload_file_with_link%%
[vupload_no_filename_text]No File Available [vupload_no_filename_text_end]
<br> <input type="file" name="vupload" size="20"><br>
[vupload_del_text]Delete File? [vupload_del_text_end] %%vupload_checkbox%%
Explanation of the HTML code above:
%%vupload_file_with_link%%
This is replaced by a link to the video file.
[vupload_no_filename_text]No File Available [vupload_no_filename_text_end]
If no file was uploaded yet then the 'No File Available' text will be displayed. You can customize this text to your own words.
<br> <input type="file" name="vupload" size="20"><br>
This displays a field with a 'Browse' button to upload a new video file.
[vupload_del_text]Delete File? [vupload_del_text_end] %%vupload_checkbox%%
This provides an option to Delete the current uploaded file with a checkbox. Note that this option will only be displayed if it is not required that the end user provides a file upload. If you are requiring end users to do a video file upload with their new submission then this option won't be available because it will give them the ability to delete the video file that was already uploaded. Note that in this situation that end users can always replace an existing file with a new one.