1
tedsmith
WF-Downloads - Removing the 'Other Files By' Part of Detailed View
  • 2004/10/15 17:11

  • tedsmith

  • Home away from home

  • Posts: 1151

  • Since: 2004/6/2 1


Is there any way of removing the 'Other Files By' section of the 'Details View' of software?

In my case at work, we are on an Intranet, so it is always me who submits the software, so my users don't need to know what other software I've submitted. I've looked for a setting in the preferences, and on the screen where software is submitted, but no obvious way of turning this feature off. So whenever a user looks at the detailed view of any software they are interested in, they get a huge list of 'Other Files Submitted by Ted'....

They do however need the detailed view itself, so I cannot simply say "Look at it in simple view".

If, to achieve this, it has to be removed from the code, which section of code is it and from which file?

Thanks

Ted

2
Stewdio
Re: WF-Downloads - Removing the 'Other Files By' Part of Detailed View
  • 2004/10/15 17:20

  • Stewdio

  • Community Support Member

  • Posts: 1560

  • Since: 2003/5/7 1


Open and edit singlefile.php and comment lines 56 to 75 (as indicated in red)

Hope this helps some.

/* $groups = (is_object($xoopsUser)) ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS;
$gperm_handler = &xoops_gethandler('groupperm');

$sql = "SELECT lid, cid, title, published FROM " . $xoopsDB->prefix('wfdownloads_downloads') . "
WHERE submitter = " . $down_arr['submitter'] . "
AND published > 0 AND published <= " . time() . " AND (expired = 0 OR expired > " . time() . ")
AND offline = 0 ORDER by published DESC";
$result = $xoopsDB->query($sql, 20, 0);

while ($arr = $xoopsDB->fetchArray($result))
{
if (!$gperm_handler->checkRight('WFDownFilePerm', $arr['lid'], $groups, $xoopsModule->getVar('mid')) || $arr['lid'] == $lid)
continue;

$downuid['title'] = $arr['title'];
$downuid['lid'] = $arr['lid'];
$downuid['cid'] = $arr['cid'];
$downuid['published'] = formatTimestamp($arr['published'], $xoopsModuleConfig['dateformat']);;
$xoopsTpl->append('down_uid', $downuid);
} */

3
tedsmith
Re: WF-Downloads - Removing the 'Other Files By' Part of Detailed View
  • 2004/10/15 17:29

  • tedsmith

  • Home away from home

  • Posts: 1151

  • Since: 2004/6/2 1


Thanks mate - I will try that on Monday when I get back to work.

BTW - when you say singlefile.php I assume you mean \modules\wfdownloads\singlefile.php and not one of the main XOOPS system files that may also be called singlefile.php(if there are any others?). Just wanted to check that I change the right one!

4
Stewdio
Re:WF-Downloads - Removing the 'Other Files By' Part of Detailed View
  • 2004/10/15 17:30

  • Stewdio

  • Community Support Member

  • Posts: 1560

  • Since: 2003/5/7 1


Sorry about that, yes, you want to edit the singlefile.php in the root of the module you are trying to edit/manipulate.

Good luck.

5
tedsmith
Re:WF-Downloads - Removing the 'Other Files By' Part of Detailed View
  • 2004/10/15 17:31

  • tedsmith

  • Home away from home

  • Posts: 1151

  • Since: 2004/6/2 1


Thanks a million!

6
rowdie
Re:WF-Downloads - Removing the 'Other Files By' Part of Detailed View
  • 2004/10/16 12:07

  • rowdie

  • Just can't stay away

  • Posts: 846

  • Since: 2004/7/21


You'll also need to change the template for wfdownloads/templates/wfdownloads_singlefile.html by deleting the following (lines 112-127) :

<div><b><{$smarty.const._MD_WFD_OTHERBYUID}></b> <{$down.submitter}></div
<
table width="100%" border="0" cellspacing="1" cellpadding="2">
  <
tr>
    <{foreach 
item=down_user from=$down_uid}>
    <
td>
     <
div style="margin-left: 10px;">
         <
a href="<{$xoops_url}>/modules/wfdownloads/visit.php?cid=<{$down_user.cid}>&lid=<{$down_user.lid}>"><{$down_user.title}></a
        (<{
$down_user.published}>)
     </
div
    </
td>
    <{if 
20 is div by 2}>
        </
tr><tr>
    <{/if}>
      <{/foreach}>
  </
tr>
</
table><br />


Rowd

7
Stewdio
Re:WF-Downloads - Removing the 'Other Files By' Part of Detailed View
  • 2004/10/17 7:32

  • Stewdio

  • Community Support Member

  • Posts: 1560

  • Since: 2003/5/7 1


Actually, I'm not a fan of just deleting lines of code, but Rowdie is right. I came back to post the very same info but he beat me to the punch.

You could just comment out line 112 to appear as:
<!-- <div><b><{$smarty.const._MD_WFD_OTHERBYUID}></b> <{$down.submitter}></div> -->

8
tedsmith
Re:WF-Downloads - Removing the 'Other Files By' Part of Detailed View
  • 2004/10/17 17:22

  • tedsmith

  • Home away from home

  • Posts: 1151

  • Since: 2004/6/2 1


Clever stuff guys - I'd never have sussed any of that out on my own. I'll be trying it tomorrow and hopefully all will go well.

Cheers

Ted

Login

Who's Online

134 user(s) are online (77 user(s) are browsing Support Forums)


Members: 0


Guests: 134


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits