User Login    
 + Register
Bookmark and Share
  • Main navigation


Remember me

Lost Password?

Register now!

Find A Code Snippet | Snippets

Find A Code Snippet | Submit A New Snippet | Create A Snippet Package

Title - Click to viewCreator
Creating Thumbnails Predator
Here's one I use throughout my WFSections hack. It handles the creation and storage of thumbnails created from a larger source file. Catz, I believe I already gave this to you but I'll post it here for others. I use this in both my blocks and module pages. Since all I need to do is include one large version of the image on the "create article" page, this function then creates all the varying sizes throughout my site. It first checks to see if the thumbnail has already been created, if so, it returns the path to the saved file (To improve performance, this way the function is only called once for each creation.) Anyways, enjoy. Draven  
Hits: 5221 Rating: 10.00 (2 votes)
Rate this Snippet | Tell a Friend | Comments (2)
Select in your Smarty Template Predator
I had a little function, I called every time, I wanted a Team selection box in my Team Module. When I went Smarty, I couldn't take the function over, but had to make one for Smarty. While making that, I thought "why make it too specific?" so I made it very simple and generic. It is saved in a file called select.html and called in a smarty template through this line: <{include file='db:select.html' title=$lang_selecttitle caption=$lang_selectcaption submit=$lang_submit name=$lang_teamid options=$teams selected=$selected}> Where: $lang_selectttitle is the form title $lang_selectcaption is the caption next to the select box $lang_submit is the text to display on the submit button $lang_teamid is the name of the variable contained in the select box (should probably be renamed to $variable_name or something) $teams is an array of options (1 => option1, 2 => option2 etc.) $selected is the value of the selected option All these should of course be set in a $xoopsTpl->assign('name', $value); line in your php document - personally, I have it in my Team class, so I just have a $team->select(); line in my php document and the above mentioned line in the smarty template. So basically, what this function does is take some language constants, a GET variable name, an array of options, a selected value and then makes a form with a single select drop-down menu, which returns to the SAME page. Hope you can use this /Mithy  
Hits: 6247 Rating: 0.00 (0 votes)
Rate this Snippet | Tell a Friend | Comments (0)
Reorder Category or articles Catzwolf
A class to easily change the oder of a category or article.  
Hits: 5501 Rating: 0.00 (0 votes)
Rate this Snippet | Tell a Friend | Comments (0)
Category Drop Down lykoszine
A quick not on the drop down script for categories. Probably so simple that everyone apart from me already knows this, but... You need to call [php]ob_end_clean();[/php] if you are adding this to a variable, not just outputting it where called.  
Hits: 2884 Rating: 8.00 (1 vote)
Rate this Snippet | Tell a Friend | Comments (0)
Page Navigation Catzwolf
How to add page Navigation to you Module  
Hits: 59849 Rating: 7.50 (2 votes)
Rate this Snippet | Tell a Friend | Comments (288)
Module Admin Menu Catzwolf
This class/function will allow you to easily render a module menu like the one in the system admin and also the modules I have been currently writing at the moment. I would like this to be used within all modules and you are quite welcome to improve on the code.  
Hits: 36240 Rating: 0.00 (0 votes)
Rate this Snippet | Tell a Friend | Comments (151)
Create a select box for users Ted
I keep having to write this stuff every project over and over again, just copy & paste and call it. $name will be the name of the option list and the default user will be selected if you set it in $defuser.  
Hits: 2859 Rating: 0.00 (0 votes)
Rate this Snippet | Tell a Friend | Comments (0)
How to find a module's option herve
Sometimes you can't use the $moduleConfig array because it is not defined or it's not yours. This code retreive a module's option in all the cases, from a normal page or from a block. A static array is used to reduce the queries count. Parameters : Option's name Module's name  
Hits: 6504 Rating: 8.00 (2 votes)
Rate this Snippet | Tell a Friend | Comments (88)
Parse CSV file intel352
Found this snippet in a snippet repository on some *other* website awhile back, dunno where. It's a set of functions with instructions, useful for parsing a CSV (comma separated) file.  
Hits: 2835 Rating: 0.00 (0 votes)
Rate this Snippet | Tell a Friend | Comments (0)
Extended Object Handler Mithrandir
This class can be extended to ease the object handling. The XoopsObjectHandler is really not more than an interface, whereas this class implements the "interface" and more methods that can be used in child classes directly. With extending this class, you just need a corresponding object class, a database table and a primary key and you will be able to use insert, delete, get, getObjects, create and updateAll methods to manipulate the objects  
Hits: 5246 Rating: 10.00 (2 votes)
Rate this Snippet | Tell a Friend | Comments (8)
Help with ASP Code aianrnoens
I need help with this code. I keep getting "Must use an updateble query" Error. I do not know what is wrong. Could anybody help me?  
Hits: 2376 Rating: 0.00 (0 votes)
Rate this Snippet | Tell a Friend | Comments (0)
Top Downloaded Release
· Proyecto eÑe (21811)
· CBB (newbb) (17729)
· SmartFAQ (16371)
· SmartMedia (16019)
· xcGallery (13723)
· XOOPS Workflow Module (11688)
· Xoops Translations (11544)
· WYSIWYG editors for XOOPS (10692)
· SmartClient (7790)
· SuoloItalico Translating Team (7435)