Announcement

Collapse
No announcement yet.

Library: Module

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Library: Module

    I would like to see a new addition to the library - Modules. Just like you get in vb etc. We have a bit of code in html, php etc in the variable that we can pass stuff to. This would be useful where, for example, I have a thumbnail routine. I have the same routine, but I need it in different places and as such have about 6 variations. If I could simply say run the routine and pass through the size, and maybe a true/false statement, or anything then I would only need one simple module to maintain.

    e.g. in my code i have

    Code:
    thumbroutine(200,200,true)
    in that module I have something like

    Code:
    module(height,width,border)
    I could then use the variables in my code. This would be great for my own usage, but I could also see a repository or swapshop type thing on the forum with lots of premade modules we can just drop in.

    Thanks,
    Paul.

    #2
    There are a few php modules knocking round, which are all held within the file 'actinic_main.php'. An example of this is 'imageheight' and 'imagewidth', which are designed to return width and height dimensions of an image.

    You can see these in action if you look at the company logo of a default design and then view the 'CompanyLogoHeight' and 'CompanyLogoWidth' layouts.

    You can write your own php functions and add them to this file, then pull them into your design where you need them.

    Comment

    Working...
    X