xoops forums

Forum Index


Board index » All Posts (mjoel)




mjoel

Quite a regular
Posted on: 7/27 6:56
mjoel
mjoel (Show more)
Quite a regular
Posts: 331
Since: 2006/12/9
#1

Re: force changing password after importing user ?

thanks geekwright, wish someday xoops will have this incorporated in the core


mjoel

Quite a regular
Posted on: 7/27 6:50
mjoel
mjoel (Show more)
Quite a regular
Posts: 331
Since: 2006/12/9
#2

Re: xmcontent 1.5 Final Released

Quote:

alain01 wrote:

<img class="rounded img-fluid" src="/uploads/xmcontent/images/" alt="<{$content_title}>">



thank you alain

it should be

<img class="rounded img-fluid" src="<{$xoops_url}>/uploads/xmcontent/images/<{$content_logo}>" alt="<{$content_title}>">


mjoel

Quite a regular
Posted on: 7/24 3:04
mjoel
mjoel (Show more)
Quite a regular
Posts: 331
Since: 2006/12/9
#3

Re: xmcontent 1.5 Final Released

Hello,

thank you for this great module

how do i make the logo of the article appear in the article page ? right now it will only appear in the index page.

i tried to edit some php file and templates of xmcontent but the logo is not appearing int the article


mjoel

Quite a regular
Posted on: 7/24 2:59
mjoel
mjoel (Show more)
Quite a regular
Posts: 331
Since: 2006/12/9
#4

Re: Switching to https

thank you for this topic..

i have successfully switch one of my xoops site to https


mjoel

Quite a regular
Posted on: 7/24 2:56
mjoel
mjoel (Show more)
Quite a regular
Posts: 331
Since: 2006/12/9
#5

force changing password after importing user ?

Hi i saw this script on github.. Quick and dirty XOOPS user import from csv file by geekwright
https://gist.github.com/geekwright/3cc71647bdfd035e609c3a045fc6db41

how do i force the user to change their password for first time login in XOOPS ?

<?php
/**
 * modified from script by christian@frxoops.org
 * Import users from a csv file into xoops 2.5.8
 *
 * Put this file and your users.cvs file in the root of your site
 * go to http://yoursite/import_users.php in your browser
 * click the button to rn the import
 *
 * Don't forget to DELETE it after you run it!
 */

/* Example users.csv file:
Bill;Barra;bill.barra@yahoo.com;changeme
Mark;Knopfler;mark@knopfler.com;changeme
Jim;Morrison;jim.morrison@gmail.com;changeme
Roger;Daltrey;roger@daltrey.com;changeme
*/

// assuming this is in the web root
include 'mainfile.php';

// make sure we run as a POST transaction, so database operations do not need "force"
if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
    echo 
'<form action="" method="POST"><input type="submit" value="Click to import"></form>';
    exit();
}

$fichier 'users.csv'// data file as : first name(pseudo);last name;email;password
// remove line break on last record

/** @var XoopsMemberHandler $memberHandler */
$memberHandler xoops_getHandler('member');
if (
false === $memberHandler) die("Unable to create member handler");

$time time();

// Open file for read
if (file_exists($fichier))
    
$fp fopen("$fichier""r");
else{ 
// unknown file
    
echo "File not found !Import stopped.n";
    exit();
}
echo 
'<pre>Begin file import '.$fichier."n";
// import line by line
while (!feof($fp)) {
    
$ligne fgets($fp4096);
    if (
'' === trim($ligne)) {
        continue; 
// blank line
    
}
    
$liste explode(";"$ligne); // create array
    
foreach ($liste as $index => $value) {
        
$liste[$index] = trim($value);
    }

    
/** @var XoopsUser $user */
    
$user $memberHandler->createUser();
    
$user->setVar('uname'$liste[0]);
    
$user->setVar('name'$liste[1]);
    
$user->setVar('email'$liste[2]);
    
$user->setVar('pass'md5($liste[3]));
    
$user->setVar('user_regdate'$time);
    
$user->setVar('user_level'1); // activated
    
$user->setVar('user_viewemail'1);
    
$user->setVar('user_avatar''avatars/blank.gif');

    
$uid $memberHandler->insertUser($user);

    if (
false === $uid) {
        echo 
sprintf("Failed to insert user %s n"$liste[0]);
        echo 
"Importation stoppée.n</pre>";
        
fclose($fp);
        exit();
    }
    
$memberHandler->addUserToGroup(XOOPS_GROUP_USERS$uid);
    echo 
sprintf("Record %d - %s addedn"$uid$user->uname());
}
echo 
"Import finished successfully.n</pre>";

fclose($fp);


mjoel

Quite a regular
Posted on: 7/24 2:50
mjoel
mjoel (Show more)
Quite a regular
Posts: 331
Since: 2006/12/9
#6

Re: wgDiaries 1.03 RC1 ready for testing

my user and me love this module very much...thank you for your spectacular work Goffy..

yes i think you can proceed to make it final


mjoel

Quite a regular
Posted on: 6/5 20:48
mjoel
mjoel (Show more)
Quite a regular
Posts: 331
Since: 2006/12/9
#7

Re: wgDiaries 1.03 RC1 ready for testing

A big thank you to Goffy for creating this multipurpose module...a great addition to Xoops


mjoel

Quite a regular
Posted on: 5/31 7:17
mjoel
mjoel (Show more)
Quite a regular
Posts: 331
Since: 2006/12/9
#8

Re: Module Builder Help

Quote:

mjoel wrote:
Let say i have create a module using module builder, how do i save my module setting so i can use it in module builder in another xoops installation ?


i have figure this out

click the Export Table to YAML in Module Builder Dashboard
it will be save in \modules\modulebuilder\testdata\english\ in export folder
then replace the content of english folder with the content in the export folder

thhen we can import sample data to use our save setting


mjoel

Quite a regular
Posted on: 5/30 14:32
mjoel
mjoel (Show more)
Quite a regular
Posts: 331
Since: 2006/12/9
#9

Re: Module Builder Help

a. in sample data - my module & my module dirty table categories is not selected as default for art_cat field

b. Resized Image

i noticed the table name not changing in element form of table fields if we rename the table eg Categories to Classifications..is this normal ?

after installing the created module we have Categories handler error missing
RuntimeException: Class 'XoopsModules\Mymoduledirty\CategoriesHandler' not found

the module should be using classification handler

ModuleBuilder 3.05 RC1 (11/11/2020)
XOOPS 2.5.11-Beta2
PHP Version 7.4.0
MySQL Version 5.7.28


mjoel

Quite a regular
Posted on: 5/30 14:09
mjoel
mjoel (Show more)
Quite a regular
Posts: 331
Since: 2006/12/9
#10

Module Builder Help

Hello

first of all thank you for this module

i have question regarding the modulebuilder module.

a. Let say i have create a module using module builder, how do i save my module setting so i can use it in module builder in another xoops installation ?

b. how do i delete unused fields in table ?



TopTop
(1) 2 3 4 ... 28 »