Welcome, Guest |
You have to register before you can post on our site.
|
Online Users |
There are currently 612 online users. » 0 Member(s) | 610 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
|
|
|
update not using id |
Posted by: marcus - 03-21-2017, 12:49 PM - Forum: UserSpice 4.3 and Below
- Replies (1)
|
|
Hi all,
I have a separate database that I want to update using the DB Class.
As I only see this possibility: $db->update('camps',5,$fields); using id I'm a bit stuck. I need to update databases using another fieldname (g_ID). How would I do that?
Regards,
Marc
Haarlem
The Netherlands
|
|
|
Modifying Logged In Users |
Posted by: Brandin - 03-20-2017, 09:48 PM - Forum: UserSpice 4.3 and Below
- Replies (11)
|
|
Hey,
Although this doesn't happen all the time, there are instances I create test or dev users, and remove them, and then I get these errors in my past 24 hour users:
"Notice: Undefined offset: 0 in /home/aircentralized/public_html/boss/users/classes/DB.php on line 155
Notice: Trying to get property of non-object in /home/aircentralized/public_html/boss/users/helpers/helpers.php on line 67"
How can I replicate this? Can we modify the function that if no user_id exists we just put a value?
Thank you!
|
|
|
$variable inside file_get_contents |
Posted by: MarcE - 03-20-2017, 08:02 AM - Forum: UserSpice 4.3 and Below
- Replies (13)
|
|
Hello!
I have recently started using UserSpice and I think it's awesome so far! I've never experienced working with a framework this uncomplicated. So cred to the developers, keep up te good work
I have run into a slight problem, and I've been looking around on the web and on this forum, and in the documentation, but haven't found exactly what i'm looking for. Being inexperienced with PHP doesn't help either.
So I thought i'd give it a shot asking you guys
Here goes:
I have a page, let's called it mypage.php
On that page, I have included a php file. Let's call it include1.php.
It is reloaded every second using a piece of javascript. Like this:
<pre> Code: <div class="View"></div>
<script>
setInterval(function(){
$.ajax({
url: "include1.php",
cache: false,
success: function(html){
$(".View").html(html);
},
});
},1000);
</script>
</pre>
That document has a list of other php files included. Let's call one of them include2.php.
It stems out like a tree, but my question is regarding what is suppose to happen inside include2.php.
The code in there looks like this:
<pre>Code: <?php
$my_url = 'http://awebsite.com/'.$user->data()->MyOwnColumn.'/other/stuff';
$test_var = file_get_contents($my_url, NULL, NULL, 5, 2);
echo $test_var;
if ($test_var === "Hi") {
echo '
Success!';
}
?>
</pre>
So the idea here is that include2.php will get text from a URL that is different for each user, depending on what is stored in "MyOwnColumn", that I have added to the database. There is only plain text on the URL which file_get_contents will read.
I have tried this:
<pre>Code: $my_url = 'http://awebsite.com/'.$user->data()->MyOwnColumn.'/other/stuff';
echo $my_url;
</pre>
And it works fine. I found "$user->data()->MyOwnColumn" in the UserSpice account.php file and tried it. I'm not sure if this is it's correct usage? I only altered the column to fit my own needs.
I have also tried the following, and it works fine with the piece of javascript reloading it:
<pre>Code: $test_var = file_get_contents('http://awebsite.com/in/plain/text', NULL, NULL, 5, 2);
echo $test_var;
</pre>
I have also tried this, but WITHOUT javascript, only Code: <?php include 'include1.php'; ?>
<pre>Code: $test_var = file_get_contents('http://awebsite.com/'.$user->data()->MyOwnColumn.'/other/stuff', NULL, NULL, 5, 2);
echo $test_var;
</pre>
And that works fine.
So the problem here seems to be, that when I use javascript to reload the included php files, it won't accept that I have put $my_url in the url which file_get_contents will "read".
The reason why I am asking here and not stackoverflow for example, is that I am not really sure how to correctly fetch data from the db in userspice. I know there is documentation on that, but I don't want to fetch everything in a table, but only from the logged in user. And that's where my knowledge of PHP limits me.
I hope I haven't been too confusing, but feel free to ask questions if I have
Best regards!
`
|
|
|
$dest |
Posted by: Brandin - 03-17-2017, 09:20 PM - Forum: UserSpice 4.3 and Below
- Replies (2)
|
|
Hi there,
Where is defined at that uses? Some of my files have variables e.g. , so the drops the part, I need to override this function to use my script you brought to my attention from another script:
Code: $actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
Any assistance would be greatly appreciated!
|
|
|
Using UserSpice Without the UI |
Posted by: tradeJmark - 03-16-2017, 02:30 PM - Forum: Documentation
- Replies (6)
|
|
Hi,
I noticed your video on integrating UserSpice with existing websites seems to use an old version of UserSpice. The files have changed since then, and I was wondering what the bare minimum requirements now are to control user access to a page. I tried including header and init on my page, but all that did was add some css that I plan to get rid of anyway. The page was viewable in the Pages screen, but taking it private did not work, I was still able to access it while signed out.
|
|
|
Manage Page Access |
Posted by: aarons - 03-16-2017, 12:20 AM - Forum: UserSpice 4.3 and Below
- Replies (2)
|
|
I have come across a strange occurrence and need help...
If I install userspice to a folder i.e. wwwroot/userspice I am able to go to the admin dashboard and add "root" pages (pages under wwwroot/userspice/*.php) with no problem.
However if I install userspice direct to the root i.e. wwwroot/ I cannot manage and add any pages from the root (it does not see any of the wwwroot/*.php files). My z_us_root has $path=['','usersc/','users/','php/'];
I can manage pages under wwwroot/users, wwwroot/userssc, and wwwroot/php, but nothing under wwwroot
Can anyone shed some light on why?
Much Thanks!
Aaron
|
|
|
Getting Started (totally inexperienced coder here!) |
Posted by: DarrenH - 03-12-2017, 04:03 PM - Forum: UserSpice 4.3 and Below
- Replies (2)
|
|
Hello,
I've got UserSpice installed and ready...but don't know where to go from there.
I have an app that allows the user to query it and pulls data from an XML file and some other resources (images, etc.)
I'd like my core app to access different files depending on the ID of the user querying it.
Is there some documentation that would point to a very simple example of this kind of functionality?
Thanks for your time, D
|
|
|
usersc-folder |
Posted by: Kighlander - 03-10-2017, 06:03 AM - Forum: UserSpice 4.3 and Below
- Replies (4)
|
|
Hi.
It is not easy to hold MY version of US up2date, because I had modified some files which will be overwritten after a patch. In that case I use a clean install (the numbers of modifications is not so great ) for using US.
But with the new version (4.2.2) the files in the folder "usersc" will not run WHEN a user IS NOT LOGGED IN. When a user is logged in, the files in folder "usersc" work normal...
Can you check it please ?
In my case I translated e.g. the "join.php" in german, but if I click on "register", the file from "users" will be load.
And the browser's adress-line shows following:
Code: http://mydomain.com//users/login.php?dest=usersc/join.php
Somewhere may be an error....
Your's
Kighlander
|
|
|
|