xoops forums

Forum Index


Board index » All Posts (lmzan)




lmzan

Not too shy to talk
Posted on: 2013/12/17 14:36
lmzan
lmzan (Show more)
Not too shy to talk
Posts: 104
Since: 2005/6/21
#1

Re: Site down after server change absolut path

Hello redheadedrod

Thanks, you've just gave me the starting point to solve it. After following your tips, in a try an error basis, I've figured out the complete absolut path:

define('XOOPS_ROOT_PATH''/var/www/html/***domain.com/web');


It's working now, thanks a lot!


*/


lmzan

Not too shy to talk
Posted on: 2013/12/16 20:41
lmzan
lmzan (Show more)
Not too shy to talk
Posts: 104
Since: 2005/6/21
#2

Site down after server change absolut path

Hello

My host server had the brilliant idea to change folders in server and now my site is down with this error message page:

Fatal error: Class 'XoopsPreload' not found in /var/www/html/**domain**.com/web/index.php on line 24


I'm running Xoops 2.4.5 in Linux Server.

My new physical path now is the root, or just /.

The mainfile.php section for the paths is:

// XOOPS Physical Paths

    // Physical path to the XOOPS documents (served) directory WITHOUT trailing slash
    
define('XOOPS_ROOT_PATH''');

    
// For forward compatibility
    // Physical path to the XOOPS library directory WITHOUT trailing slash
    
define('XOOPS_PATH''xoops_lib');
    
// Physical path to the XOOPS datafiles (writable) directory WITHOUT trailing slash
    
define('XOOPS_VAR_PATH''xoops_cache');
    
// Alias of XOOPS_PATH, for compatibility, temporary solution
    
define("XOOPS_TRUST_PATH"XOOPS_PATH);


Even though I've changed the physical path I still can't make the site work. I did a checksum and It's fine, only some imagem files are missing but not big deal.

I've checked my database and there is no link to the old physical path.

How can I fix it, any starting point?*/


lmzan

Not too shy to talk
Posted on: 2011/8/13 14:28
lmzan
lmzan (Show more)
Not too shy to talk
Posts: 104
Since: 2005/6/21
#3

Re: Good News from Mowaffaq

Thanks for the update!


lmzan

Not too shy to talk
Posted on: 2011/6/7 13:07
lmzan
lmzan (Show more)
Not too shy to talk
Posts: 104
Since: 2005/6/21
#4

Re: How to set the user group in User Profile module

Quote:

zorro87 wrote:

But if someone wants to change group once the profile is registered how to make it?


Hi there!

Well, changing groups is something very sensitive and usually a user shouldn't have the permission to do it, only the administrators.

Depending on the situation, this would require something specifically done for this purpose, because if you allow a user to manage groups, in the admin panel, you would be giving him the permission to choose from any group to be part of, and that's out of the question!

Maybe if you explain why you need this other people could help too.

Thanks for your comment!


lmzan

Not too shy to talk
Posted on: 2011/3/20 14:56
lmzan
lmzan (Show more)
Not too shy to talk
Posts: 104
Since: 2005/6/21
#5

Re: Good News from Mowaffaq

Unfortunately things are not improving, quite the contrary. It's heartbreaking to know that a colleague and friend is in a place like that. Let's hope he's OK and in a safe place with his family.


lmzan

Not too shy to talk
Posted on: 2011/2/4 13:54
lmzan
lmzan (Show more)
Not too shy to talk
Posts: 104
Since: 2005/6/21
#6

UTF-8 signature adds unwanted characters in the beginning of the page

I'm having some layout problems since I started using UTF-8 coding in my Xoops sites.

With some modules, Publisher for example, there are unwanted characters on the top of the page. When I try to validate the page I get this warning:

Quote:
Byte-Order Mark found in UTF-8 File.

The Unicode Byte-Order Mark (BOM) in UTF-8 encoded files is known to cause problems for some text editors and older browsers. You may want to consider avoiding its use until it is better supported.


There is this W3C page on the subject (http://www.w3.org/International/questions/qa-utf8-bom.en.php) but I've checked my file's encoding in Dreamweaver and Notepad++, using UTF-8 without BOM and I still get the problem.

In Publisher I checked the coding in /publisher/index.html file and the /language files.

Any idea on which file should I check to solve this? Or a different program to use in order to clean the UTF-8 signature in the beginning of files?

Check this URL to see it happening: http://unes.br/site/modules/publisher/


lmzan

Not too shy to talk
Posted on: 2010/9/12 1:39
lmzan
lmzan (Show more)
Not too shy to talk
Posts: 104
Since: 2005/6/21
#7

Re: How to set the user group in User Profile module

First of all you have to install the User Profile module 1.58, that comes with the latest XOOPS version (2.4.5). In older XOOPS versions you can also find this module, but I didn't test it in this older versions, so I can't say it works too.

Then go to the User Profile -> Fields option in the admin area.

In this page you can see all the fields available in the registration forms. On the top left, click in "Add Field".

Then you have to create a form field to let users choose which user profile they are going to register to, for example:

- Students
- Ex-students
- Teachers

We will create a selection using radio buttons for the visitor to choose from, allowing only one choice. Depending on this selection, the user will be added to a specific user group. You have to create this groups beforehand, but that part is easy.

Fill in the form for the new field:

- Title: the name of the field in the form;

- Description: some text to explain the field;

- Category: choose "Default", to be among the first options presented;

- Weight: choose "3", to appear right after the password option in the form;

- Name: give a name to the field value, in this example lets use "user_type". We'll use it later;

- Field Type: choose "radio buttons";

- Field editable from profile: choose only "Administrator";

- Required?: choose "yes";

- Show in registration form: choose "Basic", or the first registration step;

Click on "Submit" button. You'll see a confirmation message and will come back to complete the new field's information. Now you have to add the radio button options.

You we'll see 3 fields for "key" and "value". Follow the example:

- Key:1 Value:Students
- Key:2 Value:Ex-students
- Key:3 Value:Teachers

After filling this, click "Submit". You'll see a confirmation message and will come back again to complete the new field's information. You'll be able to see the options and then you can add more or just finish the edition. Click "Submit" again, you'll see the confirmation message and will go back to the User Profile -> Fields page.

Go to the registration page in your website (http://(your_site)/modules/profile/register.php) to see if your new field is on the right place and with the right options. Correct any mistakes and then we go to the next step, it's not working yet!

In order to use Ghia's suggestion, you have to change the file http://(your_site)/modules/profile/register.php. Make a backup copy of it and open the file in your favorite editor.

Look around the line 266 for this part of code
if ($message) {


Before this line insert this code
if ($profile->getVar('user_type') == 1)//if choice is "student" 
$member_handler->addUserToGroup(4$newuser->getVar('uid'));//adduser to group 4-student 

if (
$profile->getVar('user_type') == 2)//if choice is "ex_student" 
$member_handler->addUserToGroup(5$newuser->getVar('uid'));//adduser to group 5-ex_student

if (
$profile->getVar('user_type') == 3)//if choice is "teacher"
$member_handler->addUserToGroup(6$newuser->getVar('uid'));//adduser to group 6-teacher 
}


For each condition we are checking the value that was set as the Key, in the field configuration. In the first condition, if the selected option is the first (student) the user will be added to the user group 4, in this case we created a group called "Student" and this user group id is 4.

Upload the register.php file to folder http://(your_site)/modules/profile/ , clear the cache folder and try it.

I'm far from being a PHP expert, so there must be a more elegant way to do it, but I'll let this to the ninja coders to provide it!! This is as far as I can get and it's working for me!

Hope it works for you guys.


lmzan

Not too shy to talk
Posted on: 2010/9/10 3:03
lmzan
lmzan (Show more)
Not too shy to talk
Posts: 104
Since: 2005/6/21
#8

Re: How to set the user group in User Profile module

Fantastic Ghia!

Problem is solved. I've tested in a different website and it worked just fine. I'll do another round of tests in the production site but I think it's ok.

I'll post the link and the solution I tested just to close the topic with the result.

Thank you very much.


lmzan

Not too shy to talk
Posted on: 2010/9/9 19:47
lmzan
lmzan (Show more)
Not too shy to talk
Posts: 104
Since: 2005/6/21
#9

How to set the user group in User Profile module

Hi

In User Profile Module 1.58 we have the possibility to create a new field and include it in the register form (modules/profile/register.php). It's a Select form field with all the groups in the site to choose from.

The problem is that I need people to choose one group to belong to, but I don't want them to see all groups, such as administrator. I need to show only some groups.

For example, in an College website, I have specific content for each course, like Administration, Psychology, etc. When a student creates a user in the website, I'd like to give him the possibility to choose which course he is in, according to the user group he's going to choose. If it's a small group of students the admin can assign each one to a specific group, but in a big Institution, this is a lot of work.

Can I pass this information as a hidden form field?
Can I have a different register.php for each group?
Can I choose which user groups will appear in the select field in the profile registration form?

Any ideia would be welcome, so it can allow Xoops to be used in this kind of college websites.

Thanks!


lmzan

Not too shy to talk
Posted on: 2010/7/19 19:07
lmzan
lmzan (Show more)
Not too shy to talk
Posts: 104
Since: 2005/6/21
#10

Re: theme breadcrumb help

Thanks red_Slider

Problem solved!
This site is going live next weekend, thanks for the compliment!



TopTop
(1) 2 »