Providing for owners of uploaded content to edit

Am updating this code to enable user edit information provided in support of their uploaded content like mp3. The link does not load the edit page with forms to make changes.

.......................

//if the user can edit, display edit and delete links
                if ($file->canEdit()) {
                    echo "<div class=\"filerepo_controls\"><p>";
                    echo "<a href=\"{elgg_get_site_url()}mod/file/edit.php?file_guid={$file->getGUID()}\">" . elgg_echo('edit') . "</a>&nbsp;";
                    echo elgg_view('output/confirmlink',array(

                            'href' => elgg_get_site_url() . "action/file/delete?file=" . $file->getGUID(),
                            'text' => elgg_echo("delete"),
                            'confirm' => elgg_echo("file:delete:confirm"),

                        ));
                    echo "</p></div>";
                }


            } else {
                echo "<p class=\"filerepo_title\">{$title}</p>";
                echo "<a href=\"{$file->getURL()}\">" . elgg_view("file/icon", array("mimetype" => $mime, 'thumbnail' => $file->thumbnail, 'file_guid' => $file_guid, 'size' => 'large')) . "</a>";
                echo "<p class=\"filerepo_timestamp\"><small><a href=\"{elgg_get_site_url()]}file/{$owner->username}\">{$owner->name}</a> {$friendlytime}</small></p>";
                //get the number of comments
                $numcomments = ElggEntitycountComments($file);
                if ($numcomments)
                    echo "<p class=\"filerepo_comments\"><a href=\"{$file->getURL()}\">" . sprintf(elgg_echo("comments")) . " (" . $numcomments . ")</a></p>";


            }
            echo "</div>";

....................................

Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking