Creating a mod...
|
Posted
#7837
(In Topic #1766)
|
|
|---|---|
|
Well-settled |
Creating a mod...Many thanks in advance!
-Aaron / PoliticalVoice
"Some mornings it just doesn't seem worth it to gnaw through the leather straps." - Emo Phillips "Really don't mind if you sit this one out. My word's but a whisper, your deafness a SHOUT. I may make you feel, but I can't make you think." - From the album Thick as a Brick by Jethro Tull (written by Ian Anderson) |
|
Posted
|
|
|
Well-settled |
-Aaron / PoliticalVoice
"Some mornings it just doesn't seem worth it to gnaw through the leather straps." - Emo Phillips "Really don't mind if you sit this one out. My word's but a whisper, your deafness a SHOUT. I may make you feel, but I can't make you think." - From the album Thick as a Brick by Jethro Tull (written by Ian Anderson) |
|
Posted
|
|
|
Community saint |
For example, a block has two functions that must be present: The info function, which defines the author and version details. The run function, which is used to take the parameter info defined in the block comode, and execute its functions. You also need to understand the templating system, to create output properly, instead of using print and echo An example simple block: PHP code
Then the comcode: Code
[block="Hello" text="world"]main_foo[/block]
This would return: Code
Hello world
If we used: Code
[block text="and more foo"]main_foo[/block]
We get: Code
Foo and more foo
As the "param" was not defined, it resorts to its default, so $text becomes Foo. There is a lot to learn, and the best way by far is to examine a number of the more complex blocks and modules. |
|
Posted
|
|
|
Well-settled |
-Aaron / PoliticalVoice
"Some mornings it just doesn't seem worth it to gnaw through the leather straps." - Emo Phillips "Really don't mind if you sit this one out. My word's but a whisper, your deafness a SHOUT. I may make you feel, but I can't make you think." - From the album Thick as a Brick by Jethro Tull (written by Ian Anderson) |
1 guests and 0 members have just viewed this: None
Control functions:






