21
aitor
Re: blank admin if zetadigme theme selected
  • 2010/10/19 11:58

  • aitor

  • Not too shy to talk

  • Posts: 148

  • Since: 2002/1/2 2


Problem found, is in the translation folder, look as my mistake with spanish translation .



22
aitor
Re: blank admin if zetadigme theme selected
  • 2010/10/19 11:53

  • aitor

  • Not too shy to talk

  • Posts: 148

  • Since: 2002/1/2 2


Browser google chrome and mozilla.

Server.
Versión de Xoops XOOPS 2.5.0-RC
Versión de PHP 5.2.13
Versión de mySQL 5.1.46




23
aitor
blank admin if zetadigme theme selected
  • 2010/10/19 7:21

  • aitor

  • Not too shy to talk

  • Posts: 148

  • Since: 2002/1/2 2


Testing xoops 2.5 R.C.
Testing 2.5 i found that i get blank page in admin if i select zetadigme theme, tryed three times and same result.

I can access admin if I rename the folder modules/system/themes/zetadigme to zetadigme2 for example.

Someone with same problem or can test it to see if is my failure?

Note: default and legacy work correctly.



24
aitor
Re: Facebook Connect
  • 2010/5/20 13:56

  • aitor

  • Not too shy to talk

  • Posts: 148

  • Since: 2002/1/2 2


Thanks ghia, i have yet made to autoregister user and autoconnect from facebook.

I have changed the module name to fbxconnect but didn´t make diferent module for the moment.

Hope that people could test it and see how to take more advantage from things like this.

is needed to change in index.php in line 65 from

$email = $uid . "@getxo2.es";

to your domain, because facebook didn´t say us the user mail.

it can be downloaded for test at xoops spanish support.

http://www.esxoops.com/modules/wfdownloads/singlefile.php?cid=1&lid=70

For demo

http://www.getxo2.es/modules/fbconnect/



25
aitor
Re: Facebook Connect
  • 2010/5/20 7:41

  • aitor

  • Not too shy to talk

  • Posts: 148

  • Since: 2002/1/2 2


I have little more advanced now, i force registration and registered to user group directly.

Now i need to make how to loggin automatically and create a random password etc.

<?php
/**
 * ****************************************************************************
 * Module généré par TDMCreate de la TDM "http://www.tdmxoops.net"
 * ****************************************************************************
 * fbconnect - MODULE FOR XOOPS AND IMPRESS CMS
 * Copyright (c) waqar (http://www.fluidfusion.net)
 *
 * You may not change or alter any portion of this comment or credits
 * of supporting developers from this source code or any supporting source code
 * which is considered copyrighted (c) material of the original comment or credit authors.
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *
 * @copyright       waqar (http://www.fluidfusion.net)
 * @license         GPL
 * @package         fbconnect
 * @author             waqar (http://www.fluidfusion.net)
 *
 * Version : 1.00:
 * ****************************************************************************
 */

 
if (isset($_POST)) {
    foreach ( 
$_POST as $k => $v ) {
        ${
$k} = $v;
    }
}
if (isset(
$_GET['op'])) {
    
$op trim($_GET['op']);
    if (isset(
$_GET['uid'])) {
        
$uid intval($_GET['uid']);
    }
}

 
 
 
include 
"../../mainfile.php";
include_once 
XOOPS_ROOT_PATH."/header.php";
include_once 
'lib/config.php';

$user User::fbc_getLoggedIn();
(
$user) ? $fb_active_session $user->fbc_is_session_active() : $fb_active_session FALSE;
global 
$xoopsConfig$xoopsDB;
    
if (!
$user) {
    include_once 
XOOPS_ROOT_PATH."/header.php";
    
// DISPLAY PAGE WHEN USER IS NOT LOGGED IN TO FB CONNECT
    
echo render_header($user);
    echo 
render_logged_out_index();
    echo 
render_footer();
    include_once 
XOOPS_ROOT_PATH."/footer.php";    
    exit;
}

// USER CONNECTED TO APPLICATION
if ($user->fbc_is_facebook_user()) {

    echo 
"<br>uid " $user->fbc_uid;
    echo 
"<br>User " $user->fbc_name ;
    echo 
"<br>Name " $user->fbc_first_name ;
    echo 
"<br>Surname " $user->fbc_last_name ;
    
$uid $user->fbc_uid;
    
$username $user->fbc_name;
    
$name $user->fbc_name;
    
$password "aitor";
    
$pass2 "aitor";
    
$email "usuario@mail.com";
    
$url "http://www.getxo2.es";
    
    if (!
$username || !$email || !$password) {
        
$adduser_errormsg _AM_YMCACF;
    } else {
        
$member_handler =& xoops_gethandler('member');
        
// make sure the username doesnt exist yet
        
if ($member_handler->getUserCount(new Criteria('uname'$uid)) > 0) {
            
$adduser_errormsg 'User name '.$uid.' already exists';
        } else {
            
$newuser =& $member_handler->createUser();
            if (isset(
$user_viewemail)) {
                
$newuser->setVar("user_viewemail",$user_viewemail);
            }
            if (isset(
$attachsig)) {
                
$newuser->setVar("attachsig",$attachsig);
            }
            
$newuser->setVar("name"$username);
            
$newuser->setVar("uname"$uid);
            
$newuser->setVar("email"$email);
            
$newuser->setVar("url"formatURL($url));
            
$newuser->setVar("user_avatar",'blank.gif');
            
$newuser->setVar('user_regdate'time());
            
$newuser->setVar("user_icq""");
            
$newuser->setVar("user_from""");
            
$newuser->setVar("user_sig""");
            
$newuser->setVar("user_aim""");
            
$newuser->setVar("user_yim""");
            
$newuser->setVar("user_msnm""");
            if (
$pass2 != "") {
                if ( 
$password != $pass2 ) {
                    
xoops_cp_header();
                    echo 
"<strong>" _AM_STNPDNM "</strong>";
                    
xoops_cp_footer();
                    exit();
                }
                
$newuser->setVar("pass"md5($password));
            }
            
$newuser->setVar("timezone_offset"$xoopsConfig['default_TZ']);
            
$newuser->setVar("uorder"$xoopsConfig['com_order']);
            
$newuser->setVar("umode",$xoopsConfig['com_mode']);
            
// RMV-NOTIFY
            
$newuser->setVar("notify_method"1);
            
$newuser->setVar("notify_mode"1);
            
$newuser->setVar("bio""");
            
$newuser->setVar("rank"1);
            
$newuser->setVar("level"1);
            
$newuser->setVar("user_occ""");
            
$newuser->setVar("user_intrest""");
            
$newuser->setVar('user_mailok'true);
            if (!
$member_handler->insertUser($newuser1)) {
                echo 
_AM_CNRNU;
            } 

            
$sql "INSERT INTO " $xoopsDB->prefix('groups_users_link') . "  (groupid, uid) VALUES  (2, " $newuser->getVar('uid') . ")"
            
$result $xoopsDB->queryF($sql);    
        }
    }

    
    

    if (
$_POST["comment"] != "") {
        
// PUBLISH STORY TO PROFILE FEED
        
$template_data = array(
            
'post-title'=>idx($GLOBALS'sample_post_title'), 
            
'post-url'=>idx($GLOBALS'sample_post_url'), 
            
'post'=>$_POST["comment"]);            
        
$target_ids = array();
        
$body_general '';
        
$publish_success $user->fbc_publishFeedStory(idx($GLOBALS'feed_bundle_id'), $template_data);
        if (
$publish_success) { $publish_result "Published story via PHP to your profile feed!"; } else { $publish_result "Error publishing story!"; }
    }

    if (
$_POST["status"] != "") {
        
// PUBLISH STORY TO PROFILE FEED
        
$status_success $user->fbc_setStatus($_POST["status"]);
        if (
$status_success) { $status_result "Updated your status via PHP!"; } else { $status_result "Error updating your status!"; }
    }

    echo 
render_header($user);

    
    
// SHOW FACEBOOK STATUS
    
echo render_status($user$status_result);

    
// POST FEED TO PROFILE
    
echo render_feed_form($user$publish_result);

    
// SHOW ALL FRIENDS
    
$friends $user->fbc_get_all_friends(TRUE);
    echo 
render_friends_table_html($friends010"fbconnect_friend""All Friends");

    
// SHOW ALL CONNECTED FRIENDS TO APPLICATION
    
$friends $user->fbc_get_connected_friends(FALSE);
    echo 
render_friends_table_html($friends010"fbconnect_friend""Connected Friends");

    
// SHOW ALL UNCONNECTED FRIENDS TO APPLICATION
    
$friends $user->fbc_get_unconnected_friends_xfbml(TRUE);
    echo 
render_friends_table_xfbml($friends35"fbconnect_friend""Unconnected Friends");
    
    echo 
render_footer();
} else {
    echo 
render_header($user);
    echo 
render_footer();
}

include_once 
XOOPS_ROOT_PATH."/footer.php";    
?>



26
aitor
Re: Facebook Connect
  • 2010/5/19 19:47

  • aitor

  • Not too shy to talk

  • Posts: 148

  • Since: 2002/1/2 2


i am trying to change te fbconnect to allow create a user as it is logged in fbconnect, i am getting error while traying to create,

Hope that someone could help me to see where is the error so i can continue with it.

What i want is to create like,
/modules/profile/admin/user.php
but that it would be created automatically, with for example random pass and mail.

I am getting the error message _AM_CNRNU


in modules/fbconnect/index.php

if ($user->fbc_is_facebook_user()) {

echo "<br>uid " . $user->fbc_uid;
echo "<br>User " . $user->fbc_name ;
echo "<br>Name " . $user->fbc_first_name ;
echo "<br>Surname " . $user->fbc_last_name ;
$uid = $user->fbc_uid;
$username = $user->fbc_name;
$name = $user->fbc_name;
$password = "aitor";
$pass2 = "aitor";
$email = "usuario@mail.com";

if (!$username || !$email || !$password) {
$adduser_errormsg = _AM_YMCACF;
} else {
$member_handler =& xoops_gethandler('member');
// make sure the username doesnt exist yet
if ($member_handler->getUserCount(new Criteria('uname', $uid)) > 0) {
$adduser_errormsg = 'User name '.$uid.' already exists';
} else {
$newuser =& $member_handler->createUser();
if (isset($user_viewemail)) {
$newuser->setVar("user_viewemail",$user_viewemail);
}
if (isset($attachsig)) {
$newuser->setVar("attachsig",$attachsig);
}
$newuser->setVar("name", $username);
$newuser->setVar("uname", $uid);
$newuser->setVar("email", $email);
$newuser->setVar("url", formatURL($url));
$newuser->setVar("user_avatar",'blank.gif');
$newuser->setVar('user_regdate', time());
$newuser->setVar("user_icq", $user_icq);
$newuser->setVar("user_from", $user_from);
$newuser->setVar("user_sig", $user_sig);
$newuser->setVar("user_aim", $user_aim);
$newuser->setVar("user_yim", $user_yim);
$newuser->setVar("user_msnm", $user_msnm);
if ($pass2 != "") {
if ( $password != $pass2 ) {
xoops_cp_header();
echo "<strong>" . _AM_STNPDNM . "</strong>";
xoops_cp_footer();
exit();
}
$newuser->setVar("pass", md5($password));
}
$newuser->setVar("timezone_offset", $timezone_offset);
$newuser->setVar("uorder", $uorder);
$newuser->setVar("umode", $umode);
// RMV-NOTIFY
$newuser->setVar("notify_method", $notify_method);
$newuser->setVar("notify_mode", $notify_mode);
$newuser->setVar("bio", $bio);
$newuser->setVar("rank", $rank);
$newuser->setVar("level", 1);
$newuser->setVar("user_occ", $user_occ);
$newuser->setVar("user_intrest", $user_intrest);
$newuser->setVar('user_mailok', $user_mailok);
if (!$member_handler->insertUser($newuser)) {
$adduser_errormsg = _AM_CNRNU;
} else {
$groups_failed = array();
foreach ($groups as $group) {
if (!$member_handler->addUserToGroup($group, $newuser->getVar('uid'))) {
$groups_failed[] = $group;
}
}
if (!empty($groups_failed)) {
$group_names = $member_handler->getGroupList(new Criteria('groupid', "(".implode(", ", $groups_failed).")", 'IN'));
$adduser_errormsg = sprintf(_AM_CNRNU2, implode(", ", $group_names));
} else {
xoops_load('XoopsUserUtility');
XoopsUserUtility::sendWelcome($newuser);
redirect_header("admin.php?fct=users", 1, _AM_DBUPDATED);
exit();
}
}
}
}


echo "<br>" . $adduser_errormsg . "<br>";

the error message is
define("_AM_CNRNU","Could not register new user.");



27
aitor
Re: Facebook Connect
  • 2010/5/19 16:45

  • aitor

  • Not too shy to talk

  • Posts: 148

  • Since: 2002/1/2 2


I am also interested on it, as i see what is needed that when a user connects with fbconnect a xoops user must be created and logged automatically so it can be a xoops user without needing to validate his data.

I think that this could make xoops websites more easy to have users as they didn´t need to register and validate email.



28
aitor
Re: RMCommon Utilities 2 and MyWords 2 (Alpha)
  • 2010/5/19 14:46

  • aitor

  • Not too shy to talk

  • Posts: 148

  • Since: 2002/1/2 2


Is there any way to install rmcommon without gui?

I get errors if gui is not in the admin panel.

I have started videotutorials on how to install rmcommon and modules but if not redmexico gui selected it broke.



29
aitor
Re: Teaching Module
  • 2010/5/5 5:56

  • aitor

  • Not too shy to talk

  • Posts: 148

  • Since: 2002/1/2 2


For long cuestion in myquiz, if you can´t wait to see if mojtabajml add the final response to his good quiz module.

Modifiy with phpmyadmin myquiz_data, optiontext from char to text, something like
ALTER TABLE `x602_myquiz_dataCHANGE `optionText` `optionTextTEXT CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT ''


Edit file admin/index.php
line 403
from
echo "<tr><td>"._MYQUIZ_ANSWER.$i :</td><td><input type="text" name="optionText[$i]" size="50" maxlength="300" value="".$myts->MakeTboxData4Edit($Text).""></td>n";

to
echo "<tr><td>"._MYQUIZ_ANSWER.$i :</td><td><TEXTAREA wrap="virtual" cols="50" rows="4" name="optionText[$i]">".$myts->MakeTboxData4Edit($Text)."</textarea></td>n";


line 513
from
echo "<tr><td>"._MYQUIZ_ANSWER.$i :</td><td><input type="text" name="optionText[$i]" size="50" maxlength="300" value="".$myts->MakeTboxData4Edit($Text).""></td>n";

to
echo "<tr><td>"._MYQUIZ_ANSWER.$i :</td><td><TEXTAREA wrap="virtual" cols="50" rows="4" name="optionText[$i]">".$myts->MakeTboxData4Edit($Text). "</textarea></td>n";



30
aitor
Re: Teaching Module
  • 2010/5/4 9:27

  • aitor

  • Not too shy to talk

  • Posts: 148

  • Since: 2002/1/2 2


Take also a look to myquiz module it one year old as i see.

Myquiz module has final response with the errors and correct solution, i think that is better for teaching but also i think that mojtabajml module is better, so take a try and see what is better for you (i hope also that mojtabajml could ad this option to his module).

http://sourceforge.net/projects/myquiz/files/




TopTop
« 1 2 (3) 4 »



Login

Who's Online

216 user(s) are online (143 user(s) are browsing Support Forums)


Members: 0


Guests: 216


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits