Welcome, Guest |
You have to register before you can post on our site.
|
Online Users |
There are currently 431 online users. » 0 Member(s) | 429 Guest(s) Bing, Google
|
Latest Threads |
UserSpice Alpha Testing a...
Forum: News Center
Last Post: ivinsons
11-08-2024, 06:13 PM
» Replies: 13
» Views: 42,475
|
UserSpice 4.4 Development
Forum: News Center
Last Post: Amelie12
09-21-2024, 12:23 PM
» Replies: 4
» Views: 15,199
|
Welcome to the new UserSp...
Forum: News Center
Last Post: ivinsons
08-25-2024, 07:39 AM
» Replies: 2
» Views: 27,918
|
How to use hasPerm
Forum: UserSpice 4.4
Last Post: mudmin
07-20-2019, 02:45 PM
» Replies: 1
» Views: 13,755
|
Session issue? What I sho...
Forum: UserSpice 4.4
Last Post: Parth
07-17-2019, 05:06 PM
» Replies: 4
» Views: 14,502
|
Email Error
Forum: UserSpice 4.4
Last Post: Brandin
07-17-2019, 04:47 PM
» Replies: 1
» Views: 6,623
|
{ Missing Text } after up...
Forum: UserSpice 4.4
Last Post: Brandin
07-16-2019, 04:23 PM
» Replies: 22
» Views: 53,638
|
Best Practice Info
Forum: New to UserSpice?
Last Post: Brandin
07-16-2019, 11:55 AM
» Replies: 1
» Views: 13,490
|
Force to use 2FA -always-
Forum: UserSpice 4.4
Last Post: Brandin
07-12-2019, 12:43 PM
» Replies: 1
» Views: 6,636
|
e-mail not verifying
Forum: UserSpice 4.4
Last Post: LBC
07-10-2019, 11:34 AM
» Replies: 31
» Views: 76,232
|
|
|
forum spam |
Posted by: firestorm - 07-14-2017, 05:59 PM - Forum: Off-topic Discussions
- Replies (3)
|
|
hey, i noticed your issue with forum spam, have you considered moving away from wordpress/bbpress and perhaps using a lesser known script? possibly something like a static bootstrap theme for all pages but forum, then use ticketing systems like osTicket which is bootstrap based itself. just a thought.
|
|
|
help, help, date from MySQL with DB Class |
Posted by: marceloatmartins - 07-14-2017, 01:33 PM - Forum: UserSpice 4.3 and Below
- Replies (5)
|
|
Hi everybody,
How can I get Date of MySQL with DB Class?
I try something like this:
<?php
require_once '../../users/init.php';
require_once $abs_us_root.$us_url_root.'users/includes/header.php';
$today = $db->query("SELECT NOW()");
echo $today;
?>
But doesn't work:
Recoverable fatal error: Object of class DB could not be converted to string in C:\xamppadm\htdocs\appreq\app\tests\data.php on line 8
Thanks for all help
|
|
|
Wordpress like Hooks (done) |
Posted by: firestorm - 07-14-2017, 12:36 PM - Forum: Modifications and Hackery
- Replies (1)
|
|
hey guys, this class will allow us to register hooks and add actions to those hooks, you know, the way wordpress does it.
we first need to drop Hooks.php class file into users/classes folder, if my autoload class has been implemented then no more to do with this, if not then just require_once from init.php.
now we need us_hooks.php to be placed into users/helpers folder, we need to require_once in us_helpers.php above custom_functions.
us_hooks.php is for core hooks and actions, users can use usersc/includes/custom_functions.php for their hooks and actions.in the us_hooks.php file are some helper functions which are required, followed by an example of how to register a hook, and how to action a function on that hook.
user spice could potential have many hooks like:
us_head() // where we could output stylesheets, meta tags etc
us_footer() // we could output js files etc
us_init() // This could be on userspice load
before_login()
after_login()
and so on.
we register a hook like this:
<pre> Code: function my_hook {
do_action('my_hook');
}
</pre>
so my_hook() would be placed into the page or script we want to hook to.
Now we need a function we want to apply to the hook, we can have unlimited number of functions:
<pre>Code: function my_function {
echo "This is my function, Thats awesome !";
}
</pre>
now we assign the function to the hook, which accepts the hook name, function name, priority and args, priority lower the int. the earlier the function is fired :
<pre>Code: add_action('my_hook','my_function',10);
</pre>
this blog explains the wordpress system which is basically the same here: http://blog.teamtreehouse.com/hooks-word...s-examples.
heres the gist file:
https://gist.github.com/Firestorm-Graphi...c4f33bc75b
enjoy
|
|
|
transaction with DB Class |
Posted by: marceloatmartins - 07-12-2017, 08:19 PM - Forum: UserSpice 4.3 and Below
- Replies (7)
|
|
Hi Everybody,
I need to insert data into two tables, but I have to make sure that both tables are written to the same transaction.
In my case this a form like Master x Detail.
How to use "begin transaction" and "commit" and "rollback" with DB Class ?
Thanks
|
|
|
Not Logged in Redirect |
Posted by: truemama - 07-10-2017, 03:52 PM - Forum: Off-topic Discussions
- Replies (1)
|
|
Hi all - really liking userspice guys, great work. Need a bit of help...
I'm taking the user from a Public to a Private webpage and userspice redirects the user to the login page. It looks like there is a great feature wherby userspice retains where the user was going and then redirects the user once they have completed the login page it takes them to where they were going originally....great but... I'm losing a variable so if my link pre login was:
/usersc/mypage.php?id=5
it redirects to just
usersc/login.php?&dest=usersc/mypage.php
but loses the ?id=5 which is the variable I want to hold onto..
any ideas?
Cheers,
Matt
|
|
|
Validate Class |
Posted by: marceloatmartins - 07-10-2017, 12:45 PM - Forum: UserSpice 4.3 and Below
- Replies (3)
|
|
Hi everybody,
Do you have some documentation about "parameters' of Validate Class, because I have been one error like this:
Notice: Undefined index: display in C:\xamppadm\htdocs\appreq\users\classes\Validate.php on line 33 error.
In video about Validate I don't saw nothing about 'display' parameter.
Thanks
|
|
|
Autoload Classes |
Posted by: firestorm - 07-07-2017, 08:48 AM - Forum: Modifications and Hackery
- Replies (12)
|
|
I've implemented autoloading classes, drop your class file into classes folder and away you go, see gist below which has a readme.txt and class.autoloader.php, just put the class file into classes folder, open init and remove all classes called with require_once() and in their place require the class.autoloader.php file:
Code: require_once ABS_TR_ROOT.TR_URL_ROOT.'users/classes/class.autoloader.php';
thats it, classes will be required only when they are needed, we have only one require rather than multiple reducing overhead.
try it out by placing Code: bold("<br><br> Hoorah my class is included !");
in the input class then visit a page with input fields, you'll see "Hoorah my class is included !" only where the input class is used.
https://gist.github.com/Firestorm-Graphi...5f7e5c8632
NOTE: chunk6.php is only for userspice installation files
|
|
|
|