Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
THT SDK - AutoMod Module
#1
Heart 
NOTICE:
This module comes PREINSTALLED with THT 1.3.5 Reworked! PLEASE do not install it on 1.3.5 Reworked. You don't need to.

Module: THT SDK
Module Version: 1.0
For THT Version: 1.3 Reworked (Should work on older versions)
Author: Na'ven Enigma
Website: http://thelifemaster.com

DESCRIPTION:
This SDK module is designed to make it easier for people to program for THT. It ads a bunch of functions to THT that can be quite helpful and can even simplify your code. To learn what functions are available and what each one does, read the comments in the class_sdk.php file. I intend to release more functions later on as I find ones that can come in handy. You can also submit your own functions as well for inclusion in the SDK by posting the functions below. Be sure to include the description and usage in a comment above your function and I'll test it out and add it in. Future releases will overwrite the class_sdk.php file and will keep all of the existing functions and will add more functions as well. This will keep your programs stable. You may also wish to remove unused functions from the SDK and rename the SDK file and place it in your own module's directory.

To anyone who is not programming for THT, this module is a requirement for some modules, but is not a stand alone program. This means that alone, the SDK module will not do anything to enhance your THT experience. This is simply to aid developers in building programs and to be installed as a requirement for some modules that use it.


PREREQUISITES:
AutoMod: http://thehostingtool.com/forum/thread-1754.html


PHP Code:
//List of functions in the SDK:
//
//tdata($tablename, $column = "", $find = "", $where_clause = "", $return_query = 0, $orderclause = "", $like = 0)
//insert($table, $array)
//update($table, $array, $column = "", $searchfor = "", $whereclause = "", $like = 0)
//money($amount, $code = "", $noamount = 0, $local = "en-US")
//uname($id, $table = "users")
//userid($uname, $table = "users")
//uidtopack($userid = "")
//thtlog($message, $uid = "", $user = "", $usertable = "users", $time = "")
//addzeros($number)
//tpl($mod_dir, $tpl_file, $array = 0)
//isint($mixed_var)
//dropDown($name, $values, $default = 0, $top = 1, $class = "", $custom = "")
//s($number, $prefix = "") 

The comments in the SDK will guide you as to how to use them.


Attached Files
.zip   tht_sdk_1_0.zip (Size: 19.1 KB / Downloads: 735)
---
See my GitHub at https://github.com/cozylife
Reply
#2
Question about this: Can I just manually install it the same using the files included, or do I have to use the AutoMod.

I have AutoMod installed, but thought I had to upload the files from the root folder also. I uploaded them, and it wouldn't let me install from the automod page and said the directory already existed. Will it work the same?
Reply
#3
You need to delete the files your uploaded. You just upload the entire package to AutoMod and and install from there. You could manually install it by reading the install.xml file, though. Hope this helps! =)
---
See my GitHub at https://github.com/cozylife
Reply
#4
Thanks Smile Of course, if 1.3.5 is going to be with the next official release I won't have to do this, so I'm going to wait to see before I start installing plugins on my installation
Reply
#5
If you're using 1.3.5, then it comes with all the modules I made already.
---
See my GitHub at https://github.com/cozylife
Reply
#6
(04-08-2012, 11:16 PM)LightworkerNaven Wrote: If you're using 1.3.5, then it comes with all the modules I made already.

I tried 1.3.5 and 1.3 (to install autoMod and do it like that), and both had the missing order and add staff account page errors, so that's the only thing holding me back Sad
Reply
#7
Did you try a fresh install of 1.3.5 as well? I'm going to try re-installing it on my own system again. It worked last tie, but now I'm not sure what's going on. I moved to a new server with the same host, so maybe this time it will be enough of a difference to show what you're seeing.

UPDATE: I just checked it again and it works fine on my server. If you want me to take a look at yours, I'll need to have access to your copy in full, so its best to just port it to a different directory and copy the DB to another one and remove anything user specific you don't want shown.
---
See my GitHub at https://github.com/cozylife
Reply
#8
(04-10-2012, 10:14 AM)LightworkerNaven Wrote: Did you try a fresh install of 1.3.5 as well? I'm going to try re-installing it on my own system again. It worked last tie, but now I'm not sure what's going on. I moved to a new server with the same host, so maybe this time it will be enough of a difference to show what you're seeing.

UPDATE: I just checked it again and it works fine on my server. If you want me to take a look at yours, I'll need to have access to your copy in full, so its best to just port it to a different directory and copy the DB to another one and remove anything user specific you don't want shown.

Already attempted to updateit 2 times from 1.2.3, and got the same error (add staff and order page) and tried 2 fresh installs Sad
Reply
#9
This seems to be an issue for many people, but it works on my server, so its weird. I'm working with Guest3 on this issue right now and when we fix the issue for him, I'll let everyone know what we did so its fixed for everyone.
---
See my GitHub at https://github.com/cozylife
Reply
#10
OK, I figured out what was wrong with THT. It turns out that PHP 5.2 has a bug where it doesn't recognize its internal constants for the DateTimeZone class. THT suppresses many of the PHP errors for security reasons and this lead to the pages being blank. The error is now fixed and is a module made for THT 1.3 Reworked and THT 1.3.5 Reworked. http://thehostingtool.com/forum/thread-1789.html
---
See my GitHub at https://github.com/cozylife
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)