plainblack.com
Username Password
search
Bookmark and Share

Added "attachment" template vars to USS Template

Hello,

I liked to be able to see the attachments in the
www_view routine of USS.pm. I mean I wanted to see
attachments in USS main view just like you can see
them as you click on the submission. So I added the
template vars to the www_view routine. From now on it
is possible to
use "submission.attachment.box", "submission.attachment
.url", "submission.attachment.icon", "submission.attachme
nt.name" in the "Template" just like it was already
possible in "Submission Template".

These are the diffs:
=======================================
/data/WebGUI/lib/WebGUI/Wobject # diff USS_org.pm USS.pm
766c766
< USS_submission.endDate, page.urlizedTitle
---
> USS_submission.endDate, page.urlizedTitle, USS_submission.attachment
837a838,844
> if ($page->[$i]->{attachment} ne "") {
> my $file = WebGUI::Attachment->new
($page->[$i]->{attachment},$_[0]->wid,$submission->
{"submission.id"});
> $submission->
{"submission.attachment.box"} = $file->box;
> $submission->
{"submission.attachment.url"} = $file->getURL;
> $submission->
{"submission.attachment.icon"} = $file->getIcon;
> $submission->
{"submission.attachment.name"} = $file->getFilename;
> }
=======================================

Very simple :) Why wasn't this in the routine to start
with???

MAG,
Milo

System RequirementsPlease be advised: this contribution was tested with something older than WebGUI 7.5. When this contribution was uploaded there was no field for the author to fill out regarding it's requirements.
Comments
4licaboros: "

Dear Milo,

I have a  similar problem to solve, as you allready did, but I have WebGUI 6.5.5 installed.

As I see, for this version I don't have USS.pm, but I have insteed Collaboration.pm, which has a very different structure, and works with other variables names.

Could you give me a little help to solve this problem for 6.5.5.?

Many thanks,

Lica B.

"
DownloadUSS_diff.txt USS_diff.txt
LinksNo Support Offered
Statistics Downloads: 469
Views: 5892
Rating: 4
Updated: 8/12/2005
Keywords Assets Templates
NavigationBack to the Bazaar
© 2017 Plain Black Corporation | All Rights Reserved