MojoPersonals
Documentation
MojoScripts
 
   - Introduction
   - Getting Started
   - License Agreement
   - File Check
   - Installation
 
   - News
   - Program Configurations
   - System Behaviors
   - Display
   - Database Fields
   - Gallery File Types
   - Module Manager
   - Member Management
   - Member Mailings
   - Categories
   - Accounts
     - Permissions
     - Preferences
     - Conformations
   - Program Security
   - Admin Groups
   - Automation Routines
   - Debugging
   - Utilities
 
   - HTML Templates
   - Email Templates
   - Text Templates
   - Content Occurances
   - Strings and Tags
   - Featured Ads
   - Specific Program URLs
   - Customization Tips
   - Specific Templates
   - Payments
 
   - Payment Modules
   - Thumbnail Modules
   - View-On-Map Module
   - Chat Module
 
   - Troubleshooting
   - FAQ
   - Support
 
Gallery File Types

MojoPersonals allows users to upload images, audio and video files to their gallery and use in their ads. You can incorporate these files into the templates according to your needs.

First of all you need to create the file types. One file type is already created for you by default: images

By default, images can be uploaded in gif, jpg and png formats. If you want to edit this list, just access your admin control panel, click "Gallery File Types" link and then "edit" behind the file type you wish to edit. On the edit-screen you can modify FILE EXTENSIONS (please note file extensions are case sensitive, so make sure you add lower and uppercase extensions respectively), the allowed MAXIMUM FILE SIZE per file (in bytes, 1000 bytes equal to 1kb) as well as DISPLAY, THUMBNAIL DISPLAY and EMPTY THUMBNAIL DISPLAY html codes for this file type.

The DISPLAY-CODE displays the file on the gallery page, in this case the full sized image, in case of an audio file, you have to paste the proper html code here to show and play the audio file on that screen, which would be for a .wav file:

<embed src="[FILENAME]" width=145 height=60 autoplay=false></embed>

The THUMBNAIL-DISPLAY-CODE displays the thumbnail of each image on the preview page in the category browsing section, the full ad view page and in the gallery. An audio file can not be previewed of course, in this case you can add a link to the audio file similar to:

<table>
<tr><td align=center><a href="[FILEVIEW_URL]">Click to listen to sound file</a></td></tr>
</table>

The EMPTY THUMBNAIL DISPLAY html code will be shown in case no image is assigned to that ad. You can leave this field fully empty to not show anything, add some text such as "No Image Available", display a default image of your choice or whatever you like.

If you are done, submit your data, then proceed to the user gallery to check the output.

Notes on non-image file types

If you're going to allow your users to upload non-image files (e.g. audio, video, PDF etc) and attach them to ads first of all you must define new file type at admin area (Gallery File Types menu). There are two templates that has unobvious meanings: Display code and thumbnail display code. Display code is a template that would substitute [FIELD] tag: that can be just a link to a file (in case of text file), or some code to play audio/video file. Notem that you can use this code anywhere where you can use other fields. All users are allowed to assign a thumbnail to a file of any type. Edit thumbnail display code and use [FIELD_THUMBNAIL] tag in your templates in this case.

Just a few ideas what (and how) to use in common cases:

1) Audio files: normally you do not need to use thumbnails (so you can ignore thumbnail display code template). Put <object>/<embed> tags (and maybe some javascript code for 'start/stop' button) to display code and use [AUDIOFIELD] tag in your templates

2) Video files: it's a good idea to let your users add screenshots to their videos. So you'll have a thumbnail display code (normally the same as you have with images) and make display code similar to audio files.
Use [VIDEOFIELD_THUMBNAIL] in ad privew template (ad1.html). You can use either [VIDEOFIELD_THUMBNAIL] or [VIDEOFIELD] in full ad template (ad.html).

3) Text/PDF: I think that the best thing in this case would be not using thumbnails at all, but making a link to open file in new window.

How to add and implement new file gallery type like "sound"

Login to admin area, change to gallery file types section, in the file types manager, click "Add" to add another file type.

  1. Enter a class/type that addresses the file type such as "sound"
  2. Enter file extensions (comma separated) such as "wav, mid, mpg, rm"
  3. Enter a maximum amount of file size such as "500000" (in bytes)
  4. Enter a display code such as:

    <embed src="[FILENAME]" width=250 height=250 autoplay=false></embed>

    (This handles the sound file display on the templates.)
  5. Enter a thumbnail display code such as:

    <table> <tr><td align=center><a href="[FILEVIEW_URL]" target="_blank"><img src="[THUMBNAIL]" border="0"></a></td></tr> <tr><td align=center><a href="[FILEVIEW_URL]">Click to listen to sound file</a></td></tr> </table>

    (This handles the link to the sound file.)
  6. Go to database fields section, ad database and click on a custom field, select the new gallery file type for this field. You will now be able to enter the field tag on the templates where you want this file type info displayed or the info collected through a form field.

How to add and implement multimedia files such as mp3, mpeg

Login to admin area, change to gallery file types section, in the file types manager, click "Add" to add another file type.

  1. Enter a class/type that addresses the file type such as "video"
  2. Enter file extensions (comma separated) such as "mp3, mpeg, mpg"
  3. Enter a maximum amount of file size such as "500000" (in bytes)
  4. Enter a display code such as:

    <embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/" src="[FILENAME]" width=250 height=250 autoplay=false></embed>

    (This handles the file display on the templates.)
  5. Enter a thumbnail display code such as:

    <table> <tr><td align=center><a href="[FILEVIEW_URL]" target="_blank"><img src="[THUMBNAIL]" border="0"></a></td></tr> <tr><td align=center><a href="[FILEVIEW_URL]">Click here to play</a></td></tr> <tr><td align=center><a href="[FILEVIEW_URL]"><image src="/images/song.gif" border=:0"></a></td></tr> </table>

    (This handles the link to the file.)
  6. Go to database fields section, ad database and click on a custom field, select the new gallery file type for this field. You will now be able to enter the field tag on the templates where you want this file type info displayed or the info collected through a form field.
Copyright by MojoScripts.com
Terms | Privacy Policy