1
mrjingles
A myDownloads Summary Block?
  • 2004/11/24 0:36

  • mrjingles

  • Just popping in

  • Posts: 22

  • Since: 2004/11/10


Hi, I have been developing my website over the last weeks using XOOPS and I am starting to get to grips with the different modules, themes, templates and blocks.

However, I have a problem and have been unable to find a solution.

I have the mydownloads module installed 5 times. I cloned the original and now have a myvideos, myprograms, mysounds, mygames and a myjokes module for my website. I also have the myalbum module installed for pictures.

Each of these has subcategories and I have over 3000 different files uploaded across these sections. Everything is functioning extremely well and I am pleased with the results.

However, here is what I want to do :

Have a block that details how many files I have in each of these modules so that I can display to my visitors :

Videos : 600 files
Programs : 185 files
Jokes : 215 files
Pictures : 1200
Sounds : 235
Games : 325

Any ideas on how I can do this? Is there a module or block out there that is easy to re-apply.

My php skills are not too good, but I have played around with a php script that returns a value in the Smarty Debug Screen for each of these values but I have no idea how to incorporate this into XOOPS where I would like it to go (tried a php Custom Block with no luck). Here is the code (fogive me if it is c**p) I used to return these values when my php page was loaded :

list($numvids)=$xoopsDB->fetchRow($xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mydownloads_downloads")." WHERE status>0"));
$xoopsTpl->assign('totalvids'$numvids);

list(
$numprogs)=$xoopsDB->fetchRow($xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("myprograms_downloads")." WHERE status>0"));
$xoopsTpl->assign('totalprogs'$numprogs);

list(
$numgames)=$xoopsDB->fetchRow($xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mygames_downloads")." WHERE status>0"));
$xoopsTpl->assign('totalgames'$numgames);

list(
$numsounds)=$xoopsDB->fetchRow($xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mysounds_downloads")." WHERE status>0"));
$xoopsTpl->assign('totalsounds'$numsounds);

list(
$numjokes)=$xoopsDB->fetchRow($xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("myjokes_downloads")." WHERE status>0"));
$xoopsTpl->assign('totaljokes'$numjokes);

list(
$numpics)=$xoopsDB->fetchRow($xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("myalbum_photos")." WHERE status>0"));
$xoopsTpl->assign('totalpics'$numpics);


Thanks in advance for any help!!

2
Wheeler
Re: A myDownloads Summary Block?
  • 2004/12/19 23:13

  • Wheeler

  • Not too shy to talk

  • Posts: 145

  • Since: 2004/10/29


Hello mrjingles,

I see you have the block working. Your site looks great and is somewhat a model for mine. I am in the process of testing mydownloads clones for music genres at my site,
I am wondering if you could share your block code which shows all files from each clone.

Any help would be appreciated since nobody answered your post. Nobody ever answers my post which are about cloning modules?!

Thanks for your time!

3
Wheeler
Re: A myDownloads Summary Block?
  • 2004/12/29 15:50

  • Wheeler

  • Not too shy to talk

  • Posts: 145

  • Since: 2004/10/29


Help? Just spoke with mrjingles and he did not get the code to work. Maybe there should be a module summary block module!

4
Wheeler
Re: A myDownloads Summary Block?
  • 2004/12/29 16:18

  • Wheeler

  • Not too shy to talk

  • Posts: 145

  • Since: 2004/10/29


Maybe I can start up development of such a simple module.

Module Requests - Module Summary Module


Please visit this forum and support the module!
Thank you.

Login

Who's Online

363 user(s) are online (321 user(s) are browsing Support Forums)


Members: 0


Guests: 363


more...

Donat-O-Meter

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

Latest GitHub Commits