PDA

View Full Version : 2 new plugins: video and terms verification


Dave Baker
12-13-2007, 07:39 AM
Greetings all,

Two new plugins have been added in our download area and available for downloading :) .
The first one is video plugin.
It gives you flexible ability to build your own video or MP3 directory. If you do not want it, you can just add extra field to your list of fields for uploading and displaying video or playing MP3 files.
After installation you will be able to find configurations of the plugin here: Admin Panel » Configuration » Video configuration
The plugin supports the following formats: mp3, flv, rtmp, jpg, swf, png, gif

Notes: There is templates/view-listing.tpl file in the pack of plugin, you should replace it with the suggest-listing.tpl file in your directory. If you do not want to replace the file you need make the following changes:
***Open templates/yourTemplate/view-listing.tpl and find code***

{include file="header.tpl"}
<h1>{$listing.title|escape:"html"}</h1>
{if $msg}
<div class="{$type}"><ol>{$msg}</ol></div>
{/if}
<div class="box">

***Below add ***

{esynHooker name="beforeViewListingFieldsArea"}

***Save file***

You can face the following bugs in our script:

Call to undefined function upload()

Fix:
***Open admin/suggest-listing.php and find code***

elseif ('storage' == $value['type'])
{
if (!$_FILES[$field_name]['error'])
{
$ext = substr($_FILES[$field_name]['name'], -3);
$token = esynUtil::getNewToken();
$file_name = $category['id']."-".$token.".".$ext;
if (esynUtil::upload($field_name, ESYN_HOME.'uploads'.ESYN_DS.$file_name))
{
$temp[$field_name] = $file_name;
}
else
{
$error = true;
$msg = $esynI18N['unknown_upload'];
}
}
}

***Replace with***

elseif ('storage' == $value['type'])
{
if (!$_FILES[$field_name]['error'])
{
$ext = substr($_FILES[$field_name]['name'], -3);
$token = esynUtil::getNewToken();
$file_name = $category['id']."-".$token.".".$ext;
if (esynUtil::upload($field_name, ESYN_HOME.'uploads'.ESYN_DS.$file_name))
{
$temp[$field_name] = $file_name;
}
else
{
$error = true;
$msg = $esynI18N['unknown_upload'];
}
}
}

***Save file***
***Open admin/edit-listing.php and find code***

elseif ('storage' == $value['type'])
{
if (!$_FILES[$field_name]['error'])
{
$ext = substr($_FILES[$field_name]['name'], -3);
$token = esynUtil::getNewToken();

$file_name = $value['file_prefix'].$cat_id."-".$token.".".$ext;
if (upload($field_name, ESYN_HOME.'uploads'.ESYN_DS.$file_name))
{
$listing[$field_name] = $file_name;
}
else
{
$error = true;
$msg = $esynI18N['unknown_upload'];
}
}
}

***Replace with***

elseif ('storage' == $value['type'])
{
if (!$_FILES[$field_name]['error'])
{
$ext = substr($_FILES[$field_name]['name'], -3);
$token = esynUtil::getNewToken();

$file_name = $value['file_prefix'].$cat_id."-".$token.".".$ext;
if (esynUtil::upload($field_name, ESYN_HOME.'uploads'.ESYN_DS.$file_name))
{
$listing[$field_name] = $file_name;
}
else
{
$error = true;
$msg = $esynI18N['unknown_upload'];
}
}
}

***Save file***

Please make sure that your host allows to upload necessary file size.

The second one is terms verification plugin.
Adds textarea field(readonly) with a terms in it to the "suggest listing" page and checkbox which need be marked if you agree with the terms.
You will be able to change terms or disable terms verification here: Admin Panel » Configuration » Terms verification

Notes: There is templates/suggest-listing.tpl file in the pack of plugin, you should replace it with the suggest-listing.tpl file in your directory. If you do not want to replace the file you need make the following changes:
***Open templates/yourTemplate/suggest-listing.tpl and find code***

{if $config.captcha}
{include file="captcha.tpl"}
{/if}

***Before add***

{esynHooker name="afterSuggestListingFields"}

***Save file***

P.S Also have been fixed some bugs in the google map and categories map plugins.

JJ
12-13-2007, 10:22 PM
Thanks Dave.
Nice Plugins! Can't wait to try 'em out. I've been really looking forward to the Video Plugin, but the Terms Plugin is a great addition too.
Keep up the good work...:)

Dave Baker
12-14-2007, 05:59 AM
You're welcome JJ :)

majnoon
12-18-2007, 06:46 AM
Dave can you please have a look at the terms plugin. I have installed it but even if a submitter click on the radio button to agree to the terms it comes back and says u can not submit because u did not agree to the terms.

Simon Gooffin
12-18-2007, 09:11 AM
majnoon
Guys, please post your inquiries in the appropriate sections of the forums. If you found a bug - please post in our bugs section. It will be easier to track problems and their solutions later

PeekHoles
12-18-2007, 06:06 PM
I'm going to give it a whirl today.. Anyone got a demo of this working?

PeekHoles
12-18-2007, 07:35 PM
I got it installed and working. Maybe a few suggestions.

1: Make it to so someone can upload a video without having a listing url. because if your just uploading a video you may not have a url.

2: Put a status meter so you know what % the upload it at.

3: And maybe something saying the formats it will play.

That's all I like the plugin

Dave Baker
12-20-2007, 06:20 AM
@majnoon,
Yes, there is a bug in the plugin. New version of the plugin will be available in our download area.

@PeekHoles,
1: Could you explain in more detail:
"Make it to so someone can upload a video without having a listing url."
2. It can be created, but in the next versions. And most likely it will require PHP 5.2
3. You able to add some note about formats on the suggest-listing page.
Player supports the following formats:

mp3, flv, rtmp, jpg, swf, png, gif

PeekHoles
12-24-2007, 04:42 PM
@PeekHoles,
1: Could you explain in more detail:
"Make it to so someone can upload a video without having a listing url."
2. It can be created, but in the next versions. And most likely it will require PHP 5.2
3. You able to add some note about formats on the suggest-listing page.
Player supports the following formats:

mp3, flv, rtmp, jpg, swf, png, gif



Ok say someone comes to my site and wants to upload a video. They go to suggest listing and fill all there information. The problem is if they only want to upload a video and not list a site in the listing url it will not let them upload just a video. I want just a section on the site for videos but none of the videos will have listing urls. They will just be videos on the site and this plugin makes you input a listing url in order to upload video.

And I thought it would be nice to show a % meter when there uploading video so they know how much more it has to upload.

rookie
12-24-2007, 06:54 PM
Nice job Dave Baker and staff! This directory script gets better with each plugin added!
Nice job!

Dave Baker
12-26-2007, 11:12 AM
@rookie
Thanks ;)
@PeekHoles
Go to Admin Panel » Manage Listing Fields » Edit Field (which you do not want to be suggested) » find "Show On Pages" and unmark "Suggest Listing" and "Listing Details" » then find "Required Field" and mark "No".

PeekHoles
12-28-2007, 05:23 PM
@PeekHoles
Go to Admin Panel » Manage Listing Fields » Edit Field (which you do not want to be suggested) » find "Show On Pages" and unmark "Suggest Listing" and "Listing Details" » then find "Required Field" and mark "No".

Thanks I just set it to required field as no. I could not figure how to make just the video category not show and require the listing url. It took the listing url off all the categories and not just the video directory. I guess it's no big deal. I just got to figure where I can edit the suggest listing page to tell people that are uploading videos they don't need to input a listing url.

That upload meter would still be nice, it would help when your uploading big videos.