Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
plugins-topic
members video uploads dont show
Avatar
JINCUI HAO
Member
Free Members
sp_UserOfflineSmall Offline
Feb 6, 2015 - 5:34 pm

When I look at the "view existing file upload" this is what I see:

Fatal error: Call to undefined function __() in/problem-with-post-edit-buttonome3/sydney09/public_html/wp-content/sp-resources/forum-plugins/uploads-viewer/library/sp-uploads-viewer-display.php on line 65

where do I need to go to fix this and what should be on line 65 ?

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Feb 6, 2015 - 5:54 pm

Could you just confirm that you are all up to date? i.e the latest version of the uploads viewer?

Avatar
JINCUI HAO
Member
Free Members
sp_UserOfflineSmall Offline
Feb 6, 2015 - 8:09 pm

yes 

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 6, 2015 - 9:00 pm

that would be quite the odd error...  it says it cannot find a standard wordpress function...

its trying to output a wp message that you have no existing uploads...  would that be right?

you can try removing the __ which will just do a php echo instead of a wp localization...

Avatar
JINCUI HAO
Member
Free Members
sp_UserOfflineSmall Offline
Feb 7, 2015 - 12:23 am

and where would i do that ?

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 7, 2015 - 12:27 am

do what?  verify you dont have any uploads?  or try an edit to the file?

if latter, the error message gave you the exact file:  /problem-with-post-edit-buttonome3/sydney09/public_html/wp-content/sp-resources/forum-plugins/uploads-viewer/library/sp-uploads-viewer-display.php

Avatar
JINCUI HAO
Member
Free Members
sp_UserOfflineSmall Offline
Feb 7, 2015 - 12:41 am

members upload a video, it posts, but only as a black screen 0.00 minutes, it doesnt matter if they upload as slf,flv or wmv.

when I look at it through edit, thats what I see.

/problem-with-post-edit-buttonome3/sydney09/public_html/wp-content/sp-resources/forum-plugins/uploads-viewer/library/sp-uploads-viewer-display.php

 

 

/problem-with-post-edit-buttonome3/sydney09/public_html/wp-content/sp-resources/forum-plugins/uploads-viewer/library/sp-uploads-viewer-display.php, does not appear to have 65 lines ??

so where do look to fix this?

<?php

/*

Simple:Press

Uploads Viewer Plugin file tree dipslay routine

$LastChangedDate: 2014-12-22 14:04:57 -0800 (Mon, 22 Dec 2014) $

$Rev: 12216 $

*/

$_POST['dir'] = urldecode($_POST['dir']);

$_POST['url'] = urldecode($_POST['url']);

$slug = explode('/', $_POST['url']);

$pieceCount = count($slug);

$user = $slug[$pieceCount-2].'/';

$add = explode($user, $_POST['dir']);

$url = $_POST['url'].$add[1];

$dir = str_replace('/', '-', $add[1]);

$type = $_POST['type'];

if (file_exists($_POST['dir'])) {

$files = scandir($_POST['dir']);

natcasesort($files);

if (count($files) > 0) { /* The 2 accounts for . and .. */

echo "<ul class="jqueryFileTree" style="display: none;">";

# All dirs

foreach ($files as $file) {

if (file_exists($_POST['dir'].$file) && $file != '.' && $file != '..' && $file != '_thumbs' && is_dir($_POST['dir'].$file)) {

echo "<li class="directory collapsed"><a href="#" rel="".htmlentities($_POST['dir'].$file)."/">".htmlentities($file)."</a></li>";

}

}

# All files

foreach ($files as $x => $file) {

if (file_exists($_POST['dir'].$file) && $file != '.' && $file != '..' && !is_dir($_POST['dir'].$file)) {

$ext = preg_replace('/^.*./', '', $file);

switch ($type) {

case 'images':

$thumb = $url.'_thumbs/_'.$file;

$imgInfo = @getimagesize(htmlentities($_POST['dir'].$file));

$out = "<li class='file ext_$ext'><a id='file$dir$x' ";

$out.= "onclick='spjEdInsertAttachment("".htmlentities($file)."", "".htmlentities($file)."", "".htmlentities($url)."", "", "".$imgInfo[0]."", "".$imgInfo[1]."");' ";

$out.= "onmouseover='spjViewThumb("file".$dir.$x."", "".$thumb."");' ";

$out.= "onmouseout='spjCloseThumb();' ";

$out.= ">".htmlentities($file)."</a></li>";

echo $out;

break;

case 'media':

$width = urldecode($_POST['width']);

$height = urldecode($_POST['height']);

echo "<li class='file ext_$ext'><a onclick='spjEdInsertMediaAttachment("".htmlentities($file)."", "".htmlentities($url)."", "".$width."", "".$height."")'>".htmlentities($file)."</a></li>";

break;

case 'files':

echo '<li class="file ext_'.$ext.'"><a onclick="spjEdInsertText('<a href='.htmlentities($url.$file).'>Download '.$file.'</a>')">'.htmlentities($file).'</a></li>';

break;

}

}

}

echo "</ul>";

}

} else {

echo __('No existing uploads', 'sp-uv');

 

so where is the error ?

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Feb 7, 2015 - 4:15 am

Hey JINCUI,

Could you try and use the syntax highlighter when pasting code here? Just so it's easier for us to read!

Steve is referring to the last few lines of the file:

else {
    echo __('No existing uploads', 'sp-uv');
}
Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Feb 7, 2015 - 4:30 am

This would be a temporary fix. More important to find out why it is doing it. As Steve said - this is a core WiordPress function.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 7, 2015 - 11:43 am

we will come up with a work around for that core wp function not being available in that case...

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17363
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625