upload file in editable box

24 views
Skip to first unread message

xi chen

unread,
Jun 10, 2013, 1:50:25 PM6/10/13
to subjec...@googlegroups.com, Megan Mitchell
Hi Andrew and all,

We are currently on version 1.01. 

While using file upload function in an editable box, we found that the option to rename the file was not functioning. I could edit the source code to rename the file, however there is an unlinked image next to the file name. The image path is .../sp/assets/images/icons/. Since there is no image file specified, Firefox would display the alt tag which is the librarian's folder name/file's original name. Chrome would display an image holder which looks strange and problematic to our users. The live example is here http://www.oberlin-college-library.org/sp/subjects/guide.php?subject=OCRFMMUF    ( the problem item is in the last box called "Other Resources)

I don't know if other institutions have had similar experience. If it is a bug, has it been corrected in version 2.0?

Thanks!

Xi Chen
Oberlin College Library

Andrew Darby

unread,
Jun 10, 2013, 2:56:49 PM6/10/13
to subjec...@googlegroups.com, Megan Mitchell
Hi Xi Chen, one of the big changes in 2.0, under the hood, was switching from FCKeditor (which is end of life and increasingly buggy) to CKeditor for the WYSIWYG editing.  I just tested and this seems to work in 2.0.  However, I also just installed 1.0.1 and it worked for me there, too, on my localhost.  So I'm not sure what's going on.  But, in control/includes/classes/sp_Pluslet.php, this is the offending section (I think):

case "fil":
$ext = explode(".", $fields[1]);
$our_icon = showDocIcon($ext[1]);
$file = "$UserPath/$fields[1]";
$tokenized.= "<a href=\"$file\" $target>$fields[2]</a> <img style=\"position:relative; top:.3em;\" src=\"$IconPath/$our_icon\" alt=\"$ext[1]\" />";
break;

It seems like that IconPath is put in there fine, but not the $our_icon.  You might want to print out that $ext[1]--it should show docx, that should be passed to showDocIcon (in functions.php), and it should return doc.png.  But obviously that's not quite happening. 

Andrew



--
You received this message because you are subscribed to the Google Groups "SubjectsPlus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subjectsplus...@googlegroups.com.
To post to this group, send email to subjec...@googlegroups.com.
Visit this group at http://groups.google.com/group/subjectsplus?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

xiche...@gmail.com

unread,
Jun 10, 2013, 4:12:19 PM6/10/13
to subjec...@googlegroups.com
Thank you Andrew for the explanation.
Before I find out what's going on here, we might use some workaround to create the link.
Xi 
Reply all
Reply to author
Forward
0 new messages