1
ivobikov
I want To Create a Block with a content .....?
  • 2005/10/29 15:03

  • ivobikov

  • Just popping in

  • Posts: 12

  • Since: 2005/7/13


Hello,

I have an idea, about a XOOPS SiteContent Block... ;)
But i dont know exactly how can I do that. :) Here is the Block :

-----------------------------------------
..:: DownLoads - Number - ::..
..:: Photos - Number - ::..
..:: Games - Number - ::..
..:: WebLinks - Number - ::..
..:: News - Number - ::..
-----------------------------------------


I can create a block, but i thinking how can i make a Numbering.. and with what must i change "number" to be updated when new File is uplouded or Games,photos,news.... I Belive you understand me.. :)

Thank You.



Only i say... I use that blocks "MyDownloads", "MyLinks", "News", "MadGames", "MyAlbum" if this help you, how can we make a block ;) :)

2
JMorris
Re: I want To Create a Block with a content .....?
  • 2005/10/29 16:48

  • JMorris

  • XOOPS is my life!

  • Posts: 2722

  • Since: 2004/4/11


I'm not sure I can give you an answer to your problem, but perhaps I can help get a little more clarification on what it is you are trying to accomplish.

If I'm reading your post correctly, It appears that you're wanting to show the total number of DownLoads, Photos, Games, WebLinks, and News articles on your site in a custom block

Is this correct?

Best Regards,

James
Insanity can be defined as "doing the same thing over and over and expecting different results."

Stupidity is not a crime. Therefore, you are free to go.

3
ivobikov
Re: I want To Create a Block with a content .....?
  • 2005/10/30 9:29

  • ivobikov

  • Just popping in

  • Posts: 12

  • Since: 2005/7/13


YES :) Exactly Can you help me ? :) Thank You.

4
smdcom
Re: I want To Create a Block with a content .....?

GIJOE has made extensible waiting block module. Here

It has many plugins for well-known modules available.

PS: Don't double post. Stick to one topic ONLY. Thank u.

5
seventhseal
Re: I want To Create a Block with a content .....?

Quote:
I can create a block, but i thinking how can i make a Numbering.. and with what must i change "number" to be updated when new File is uplouded or Games,photos,news.... I Belive you understand me.. :)


To answer your question, this is actually pretty easy if you have an understanding of the tables that support a particular module you want to show. I have done this in my latest XoopStats public module release. And, it can be seen here in the Miscellaneous Stats section.

Here is some code to get you going - for example:

Let's say you are using mylinks module and you want to count out the number of categories and active links. You would do this:

// check if it's active
if ( $xoopsDB->getRowsNum$xoopsDB->queryF("select * from ".$xoopsDB->prefix("modules")." where dirname='mylinks' AND isactive='1'" ) ) > )
{
// count how many links are active
  
$links $xoopsDB->getRowsNum($xoopsDB->queryF("select * from ".$xoopsDB->prefix("mylinks_links") ) );

// count how many categories  
  
$cat $xoopsDB->getRowsNum($xoopsDB->queryF("select * from ".$xoopsDB->prefix("mylinks_cat") ) );
}


What's missing is your smarty vars or whatever you want to use to display. The main thing is, look at the tables associated with a given module you want to count. Understand what the tables are doing, and then query to your hearts content. You can then display anything about them you want.

Good Luck!
John Horne - a.k.a. - VelocityWebDev, Seventhseal, CreepingDeath
**********************************
VelocityWebDev Tech BLOG
VelocityWebHost Hosting and Design

6
ivobikov
Re: I want To Create a Block with a content .....?
  • 2005/11/1 9:37

  • ivobikov

  • Just popping in

  • Posts: 12

  • Since: 2005/7/13


Thank you but i cant say a understand all because i'm newbie and i dont understand php :) But i download a module Statistics from your link and i seen this :

Registered Users 48
Users Online 2
Authors 13
Active Sessions 313
Stories Published 92
Stories Waiting 0
News Topics 6
Comments Posted 12
Web Links 60
Link Categories 7
XOOPS Version XOOPS 2.0.13

Thats like me, I mean this i wanted to do but with more parts, like Total Files in MyDownLoads, total Photos in MyAlbum and total games in MadGames :) And second how can i move that statistic to my Custom block ? :) Thank you.

Login

Who's Online

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


Members: 0


Guests: 153


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