The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Adding Ajax to userspice
#1
Hi,
I am new to userspice. Already played around with the framework but was wondering how to add ajax to this framework?
I want to know how to use ajax/http calls to userspice? Suppose, I have a login form and want to submit these form's data through javascript to users/login.php file. Should I make changes to login.php file? or what?
Please help. Thanks
  Reply
#2
If you're changing core files your best bet is to copy to the into usersc. It will auto-redirect when there is a custom file to replace the same file name. You should be fine to use your AJAX scripts without issues if I'm understanding your question correctly.
  Reply
#3
Thanks Brandin. Somehow find a solution, but still I have another issue. I already have a project with the following directory structure:
Myproject
----->js
----->css
----->core
----->includes
----->index.php

and now I want to add userspice as a module to this structure which should look like this:
Myproject
----->js
----->css
----->core
----->includes
-----> userspice
-----> index.php

Now, how to manage my private and public pages by userspice as the z_us_root.php file is inside the userspice directory?
thanks



  Reply
#4
So if I'm understanding correctly you want to control files that are outside of this userspice directory you made? You should really have the userspice files in root.
  Reply
#5
Yes, that is what i want to control files out of my userspice directory.
What if I only put z_us_root.php file in root directory and other userspice files inside userspice directory that I made? Is it possible to control files out of userspice directory now?
  Reply
#6
I imagine it is possible, just worried about the logistical aspect. When calling your init you'll have to use "../userspice/users/init.php" and run your PHP self script. In z_us_root you'll have to use "../core" for example to capture the folder data...I just worry about how this will work wise of page management. @Mudmin, thoughts?
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)