-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add $xoops_page for theme #197
Conversation
Looks good! I would still like to see the startpage configuration value exposed as $xoops_startpage. There could be some uses for that piece of information. |
I do not understand what I should do. |
Sorry, I didn't specify that correctly. This should be the module directory name from If the startpage option is turned off, $GLOBALS['xoopsConfig']['startpage'] is either not set, empty or the string '--'. (disclaimer - I inherited that 😉 ) In any of those cases a value of 'system' would be appropriate. |
Now $xoops_startpage is available in the theme
Thank you for your explanations. I should have realized with other messages... Sorry modification is sent |
Fantastic 👍 |
Had to make a little change after some more testing, see #198. I didn't think of it before, but it is instructional. On a linux/unix system it is possible to create a "symlink," a symbolic link to place a "virtual" copy of a file or directory in another place in the file system. There is only one copy of the files, but there can be 2 or more names for them. For Debian derivatives, the default web root is /var/www. Rather than working directly in that directory, for me it is easier to clone a repository to my own home directory, and symlink the htdocs directory into the web root, for example as a directory "xoops." This means that the same file can be accessed as /var/www/xoops/index.php or /home/richard/XoopsCore25/htdocs/index.php. The first is a symlink, while the second is the real path. Normally, this doesn't cause a problem, but $_SERVER['SCRIPT_FILENAME'] ends up as the symbolic link, while XOOPS_ROOT_PATH is resolved to the real path during the install. The $xoops_page code ended up with a real name and a virtual name for the same file. This is easily resolved by adding a realpath() around the paths in \xos_opal_Theme::xoInit() when $xoops_path is calculated. Sorry I didn't catch that before. Works great! Thanks again! |
Thank you for the information and corrections. I never found! |
Exemples of values of $xoops_page:
If you are here: http://localhost/htdocs/ ---> $xoops_page = index
If you are here: http://localhost/htdocs/modules/profile/edituser.php ---> $xoops_page = profile/edituser
$xoops_page to more easily customize themes