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 Pages
#1
Hi - I have recently upgraded to the latest version of userspice but now I cant see the pages I have already created in the admin system.

<?php //DO NOT DELETE THIS FILE.
$path=['','users/','usersc/'];


//Only add or remove values in the $path variable separated by commas above

$abs_us_root=$_SERVER['DOCUMENT_ROOT'];

$self_path=explode("/", $_SERVER['PHP_SELF']);
$self_path_length=count($self_path);
$file_found=FALSE;

for($i = 1; $i < $self_path_length; $i++){
array_splice($self_path, $self_path_length-$i, $i);
$us_url_root=implode("/",$self_path)."/";

if (file_exists($abs_us_root.$us_url_root.'z_us_root.php')){
$file_found=TRUE;
break;
}else{
$file_found=FALSE;
}
}
//redirect back to Userspice URL root (usually /)
header('Location: '.$us_url_root);
exit;

?>
  Reply
#2
Hmm. I'm not sure that I'm following you.

If you copied and pasted that file from online, there is a chance that the quotes are messed up. The curly quotes cause problems.

This is the proper z_us_root
https://pastebin.com/kgxfsKVa

If you are wanting to add additional folders to monitor, you should do it like this...

Code:
$path=['','users/','usersc/','myotherfolder/'];
  Reply
#3
When I login to admin it doesnt recognise any pages but I know they are there in the user folder?

Regards

Matt
  Reply
#4
Is there any errors on the admin_pages file?
  Reply
#5
No errors which has confused me? Shall I email you my login details?
  Reply
#6
Did you do what mudmin suggested above? Changing the backticks to '?
  Reply
#7
Hi - now it errors saying too many redirects?
  Reply
#8
This would be as users/admin_pages.php got removed from the DB I'm imagining. Manually add this to the DB and add a corresponding pages_permission matches
  Reply
#9
Ok got that back working and can now see that page in Manage Page Access section.

When you click on the page to set the permissions it isn't finding the details?
  Reply
#10
Do you have existing data/modifications to your US? If you don't, I suggest a fresh install...otherwise, we'll have to dig deeper into this. Did you make any modifications to us_helpers? And can you also paste your z_us_root?
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)