Welcome, Guest |
You have to register before you can post on our site.
|
Online Users |
There are currently 397 online users. » 0 Member(s) | 394 Guest(s) Bing, Facebook, 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
|
|
|
PDO newbie loop question |
Posted by: palmeros - 11-10-2016, 06:24 AM - Forum: Off-topic Discussions
- Replies (4)
|
|
Hi
i'm totally new with PDO but i'm thinking it might be good to reuse the userspice connection. so if anyone could give a hint in how i loop out the data i got with below query i would be grateful.
Code: $clist = DB::getInstance()->query("SELECT * FROM company")
Code: echo $clist->count()
works just fine but i cant figure out how get that to a foreach or while loop...
Code: foreach ($clist as $row) {echo $row["xyz"];}
does not work...
|
|
|
Hi + Basic Question |
Posted by: sandrews - 11-04-2016, 04:55 PM - Forum: New to UserSpice?
- Replies (3)
|
|
Hello,
I'm using your framework to work on an internal project for the team I lead and having one hell of a time finding something really simple >_< I've changed the logo.png, but for the life of me cannot figure out how to put text next to it without it wrapping to the next line instantly. I've tried adjusting padding, hspace, wrapping in <p>, putting before and after, wrapping in a new div, etc. I know I'm missing something insanely easy, but I've been working in Swift for way too long and have forgotten a lot of this stuff.
My end goal is to use your framework to create a break queue/lunch queue for my team and start generating reports so I can see how little some people actually work....then eventually use it to track common issues to develop training material. But my OCD isn't letting me get any further until I figure out the front end haha ._.
|
|
|
Forums |
Posted by: Brandin - 11-04-2016, 11:07 AM - Forum: Off-topic Discussions
- Replies (10)
|
|
Hey there,
When logging into the forums here, it redirects you to the homepage. Can you make it so it redirects us back to the forum?
Thanks.
|
|
|
ajax call response |
Posted by: dimitrisscript - 11-04-2016, 09:17 AM - Forum: UserSpice 4.3 and Below
- Replies (6)
|
|
So I have built 3 ajax scripts that return some values from my database.
However, whenever I run these ajax calls, they all return the same response:
data returned:
--------------
<script>
// Place analytics code here
</script>
Case 1:
If I don't set a response, a response is sent anyway with the above data.
Case 2:
If I set a response eg. echo "test"; then the following response is received:
data returned:
--------------
<script>
// Place analytics code here
</script>
test
Case 3:
If I don't include init.php then the ajax calls behave as they should.
Obviously something is wrong here, because the only file i'm including is init.php
Conclusion:
So I went to /users/helpers/us_helpers.php and commented out line 22:
//require_once $abs_us_root.$us_url_root.'usersc/includes/analytics.php';
And the problem looks fixed for now.
|
|
|
securePage |
Posted by: sqluser - 11-03-2016, 08:44 PM - Forum: New to UserSpice?
- Replies (2)
|
|
Hello,
the code Code: if (!securePage($_SERVER['PHP_SELF'])){die();}
is in my configuration not working in a new file without the link.
Code: require_once $abs_us_root.$us_url_root.'users/helpers/helpers.php';
Than the page is visible, or redirected to the login screen, nice and perfect coding.
The link for this page is on the main screen, and if the user is not logged in, or has the correct settings for this file, why bother him with a link that he can not activate.
If I disable the link with securePage the error message is on my main page.
Quote:You must go into the Admin Panel and click the Manage Pages button to add this page to the database. Doing so will make this error go away.
How to code this one?
|
|
|
Hi from Martijn |
Posted by: mcvanderkooij - 11-03-2016, 07:28 PM - Forum: New to UserSpice?
- Replies (4)
|
|
I'm going to create a cloud storage solution for the pictosheets in Picto-Selector (a Windows application) and for this I need a user management system (user creation and verification) and UserSpice seems to be right what I need.
I've created the following template for my commands:
<pre> Code: <?php
require_once '../users/init.php';
$username = Input::get('username');
$password = Input::get('password');
$status = '';
$error_message = '';
$result = array();
if( $user->login($username, $password) ) {
$result['test'] = 'This is a positive result';
$status = 'ok';
$error_message = '';
} else {
$status = 'error';
$error_message = 'Invalid username and password.';
}
header('Content-type: application/json');
echo json_encode(
array(
'result' => $result,
'status' => $status,
'error_message' => $error_message
)
);
</pre>
The only change I needed to get 'clean' json back was to comment this line in us_helpers.php (because it was including a empty script tag from analytics:
//require_once $abs_us_root.$us_url_root.'usersc/includes/analytics.php';
So far it is very promising, thanks for creating this :-)
You can find Picto-Selector on www.pictoselector.eu (Freeware Windows application and a Wine wrapper for MacOS)
|
|
|
|