Zikula: A Flexible Open Source Content Management System
home | forum | contact us

Dizkus

Bottom
Newbie in Need of Assistance to Create a Simple Module
  • Posted: 27.09.2006, 18:25
     
    Llewen
    rank:
    Freshman Freshman
    registered:
     August 2006
    Status:
    offline
    last visit:
    12.10.06
    Posts:
    8
    First I should say, I'm not a PHP expert, I am very much a beginner in every sense of the word. I could probably write a program in PHP that printed, "Hello World", or create a rudimentary web page that wouldn't be much more advanced than a page coded in pure HTML. I've also "fixed up" a couple of modules for PHP Nuke, modules that were no longer under development and were no longer compatible with more recent versions of PHP Nuke. This involved mostly comparing and cutting and pasting. I'm a bit better than a newbie at HTML, I've coded a basic website, and recoded the headers for my Xanthia theme.

    Anyway, what I would like to do now is create a very simple module, if anyone knows anything about PsychoStats, I'm trying to create a module that displays game server stats in a simple block on my Post Nuke home page, using the PsychoQuery code that comes with PsychoStats 2. I want it to query the server and show a small picture of the map being played, as well as a list of the players on the server with their kills and deaths.

    I have the query code for the server. I don't understand it, but I think I can probably get some help with that, so all I'll need, hopefully, is a simple module that I can plug the variables into and display them. I've been looking at the example module and I am wondering if there is anywhere some simple basic tutorial on creating a simple Post Nuke module. I checked the Wiki and it seemed like everything I looked at had no information available, ie. no one had submitted anything.

    --
    AMD Athlon 1200
    512 MB SDRAM
    Debian GNU/Linux 3.1 Sarge (custom kernel 2.6.8.1)
    Apache 2.0.54-5
    PHP 4.3.10-16
    MySQL 4.0.24-10sarge
    PostNuke .762
    Xanthia Theme - modded PT20X
  • Posted: 27.09.2006, 19:41
     
    Simon
    rank:
    Steering Committee Steering Committee
    registered:
     December 2002
    Status:
    online
    Posts:
    13418
    If all you want is a block, why not paste the PHP code you've been given into a PHP block?

    --
    Regards,
    Simon

    itbegins.co.uk - Zikula Consulting

    Please read the Support Guide
  • Posted: 27.09.2006, 21:41
     
    Llewen
    rank:
    Freshman Freshman
    registered:
     August 2006
    Status:
    offline
    last visit:
    12.10.06
    Posts:
    8
    That might be a good idea. I guess I had it in the back of my mind that I'd like to eventually create a full PsychoStats module for Post Nuke, the way one has been created for PHP Nuke, and I was thinking if I could learn how to create a module for PsyhoQuery, this would be a step in that direction. I was thinking also I would like to be able to do some simple things like have the information from the last game played stored in the database so that would come up when you start the website, instead of a blank block template, together with an indication as to whether the server is up or down.

    I'll have to think about this some more. Creating a simple block might be a better place to start as it would obviously be much easier. I'm having a hard time even figuring out what I need to do with the PsychoQuery code...

    --
    AMD Athlon 1200
    512 MB SDRAM
    Debian GNU/Linux 3.1 Sarge (custom kernel 2.6.8.1)
    Apache 2.0.54-5
    PHP 4.3.10-16
    MySQL 4.0.24-10sarge
    PostNuke .762
    Xanthia Theme - modded PT20X
  • Posted: 01.11.2006, 09:09
     
    pnDev
    rank:
    Helper Helper
    registered:
     July 2004
    Status:
    offline
    last visit:
    23.08.08
    Posts:
    448
    The Example module and the basic Developer documentation on this site is a good place to start looking and learning on how to make your first module.

    --
    pnDev.com ~ featuring the PostNuke paid services forum

Extensions Moderation

Main Menu

Extensions Database

Documentation

Development

Login

Donate to Zikula