PDA

View Full Version : vBa CMPS: Attachment Stats Module


ericgtr
12-22-2004, 10:00 PM
I made this same mod for forumhome and decided to also create a module for it. It will display the following:

Total Files
Space Used
Total Downloads

Create a template called adv_portal_attach

Paste this inside of it:


<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat"><span class="smallfont"><b>$vba_options[portal_blockbullet] Attachment Stats</b></span></td>
</tr>
<tr>
<td class="$getbgrow" align="center">

<div>$vbphrase[block_attach_total]: $total_attach[count]<br />
$vbphrase[block_space_used]: $total_hits2_in_mb mb<br />
$vbphrase[block_total_downloads]: $total_downloads

</td>
</tr>
</table>
<br/>


Upload the attach.php file to your modules directory

Create a new module.

Module Title: Attachment Stats
Module Indentifier: (leave blank)
File to Include: Choose attach.php
OR Template to Include: (leave blank)
Templates Used: adv_portal_attach

Add 3 new phrases:

Type: Global
Varname: block_attach_total
Text: Total Files

Type: Global
Varname: block_space_used
Text: Space Used

Type: Global
Varname: block_total_downloads
Text: Total Downloads

That's it! :)

The Realist
12-23-2004, 05:14 PM
Dont think you have attached the correct php file M8

ericgtr
12-23-2004, 05:21 PM
Ack! Fixed, thanks :)

lasto
12-23-2004, 07:05 PM
installs perfect m8

shadiguy1
12-23-2004, 07:26 PM
does this thign slow down the server alot when u have a big database since installing my forums are dragging

ericgtr
12-23-2004, 07:33 PM
Not sure but it's basically 3 queries being pulled, it hasn't slowed my site down at all with all the attachments and downloading I have going on. That's not to say that it won't though, if you find it's slowing you down I would definitely pull it.

The Realist
12-23-2004, 08:52 PM
Working 100% now with the correct php file :)

Ack! Fixed, thanks :)

Delphiprogrammi
12-25-2004, 12:26 AM
installs fine but it shows up with no info i mean no stats

look at the image and you get what i mean

ericgtr
12-25-2004, 03:16 AM
installs fine but it shows up with no info i mean no stats

look at the image and you get what i mean
It looks like it's not picking up the variables, did you upload the attach.php file (attached in this post) to your modules directory? You may also want to ensure that you that there are no typos in the template name adv_portal_attach just to be safe :)

Delphiprogrammi
12-25-2004, 11:29 AM
hi,

i found a problem with my vb advanced portal.I add a module like your instructions tells us todo but the system doesn't seem to remember to include the file "attach.php" when i login to my ACP i hit vbcmps at the left and then edit modules i see "file to include :none" i never had this problem with vbcmps might be a bug ?? i see this everytime i edit my vbcmps modules "attach stats" files to include none althrough i hit the "save" button" and i get no errors at all strange :speechless:

ooooh guess i whas to drunk from celebrating christmas i didn't leave the templates used filed blank (what a stupid error) :disappointed:

anyway all working like a champ

ericgtr
12-25-2004, 12:14 PM
hi,

ooooh guess i whas to drunk from celebrating christmas i didn't leave the templates used filed blank (what a stupid error) :disappointed:

anyway all working like a champ

I did that too when I first started working with it :rolleyes: