xoops forums

Forum Index


Board index » All Posts (mjoel)




mjoel

Quite a regular
Posted on: Today 8:56
mjoel
mjoel (Show more)
Quite a regular
Posts: 275
Since: 2006/12/9
#1

Re: Trouble with Publisher 1.07

i solved the problem number number 1

all the categories i set my username to be the moderator of the categories

i manually set it all back to 0 in phpmyadmin table

UPDATE `p0hkp_pengumuman_categoriesSET `moderator` = '0'


i dont have this problem in publisher 1.05

still trying to figure out problem #2


mjoel

Quite a regular
Posted on: Today 2:15
mjoel
mjoel (Show more)
Quite a regular
Posts: 275
Since: 2006/12/9
#2

Re: wgGallery 1.10 ready for testing

Hi

thanks for this module..great work so far

i downloaded the latest revision from github...i tried to import from my existing extgallery module ..im using eXtGallery 1.13 RC1

i have more than 10 albums and hundred of images but nothing is display

Resized Image

i received this error after submit

MySQL-Error: Unknown column 'ec.cat_text' in 'field list'


mjoel

Quite a regular
Posted on: Today 2:01
mjoel
mjoel (Show more)
Quite a regular
Posts: 275
Since: 2006/12/9
#3

Trouble with Publisher 1.07

Hello xoops...i need help on using Publisher 1.07

XOOPS Version XOOPS 2.5.10
PHP Version 5.6.40
mySQL Version 5.7.28

i recently update my xoops from 2.5.9 to 2.5.10 and the publisher module from publisher 1.05 to 1.07 all is going well except

1. i can't access the category in publisher admin .. i receive 500 error.. i have more than 10 categories

2. editing any current article does not have any problem but I'm having problem creating new article after submit i received the message "Sorry. It was not possible to update the article!"

some solutions that i have tried clean cache...redone all the permission setting and clone my publisher module and copy all the data to the clone module..same problem

turning on debug does not return any related error


mjoel

Quite a regular
Posted on: 1/31 4:47
mjoel
mjoel (Show more)
Quite a regular
Posts: 275
Since: 2006/12/9
#4

Help with extcal mysql table

Hello XOOPS

Im using a modified extcal module ..where i dont want to set time and i want to use only date for event....i would like to update my existing extcal database ...

so that event_start and event_end field of extcal module to have 00:00:00 time

as example from 2012-11-14 08:00:00 to 2012-11-14 00:00:00

the problem is in extcal event_start and event_end are originally in int format

SELECT `event_start`,`event_endFROM `xxx_extcal_event`

Resized Image

i use this query to convert event start and event end to a readable date using this query

SELECT FROM_UNIXTIME(`event_start`),FROM_UNIXTIME(`event_end`) FROM `xxx_extcal_event`

Resized Image


i tried something like to update the time but its not working
UPDATE `xxx_extcal_eventSET FROM_UNIXTIME(`event_start`)=concat(FROM_UNIXTIME(`event_start`), ' 00:00:00'), FROM_UNIXTIME(`event_end`)=concat(FROM_UNIXTIME(`event_end`), ' 00:00:00')


after update event_start and event_end should be back in int format

how do i do this help.. im using phpmyadmin


mjoel

Quite a regular
Posted on: 12/24 3:20
mjoel
mjoel (Show more)
Quite a regular
Posts: 275
Since: 2006/12/9
#5

Re: verify registered user in html

use this

global $xoopsUser
if (!
is_object($xoopsUser)) {
    
redirect_header('index.php'3"You have no permission");
}


check also
https://xoops.org/modules/newbb/viewtopic.php?topic_id=77168


mjoel

Quite a regular
Posted on: 2018/3/24 5:30
mjoel
mjoel (Show more)
Quite a regular
Posts: 275
Since: 2006/12/9
#6

Re: Dummy block in Dummy module

Maybe a new release of the new dummy module by trabis

just some suggestion to add

- dummy block with block template
- add two three pages..
- function add/edit delete
- able to find the pages through search.php
- submenus
- simple admin page

etc

it will be much easier for user


mjoel

Quite a regular
Posted on: 2018/3/24 5:22
mjoel
mjoel (Show more)
Quite a regular
Posts: 275
Since: 2006/12/9
#7

Re: mysql_error - help with mysql query code in xoops

Thank You Very Much Mamba for the long explanation


mjoel

Quite a regular
Posted on: 2018/3/24 1:08
mjoel
mjoel (Show more)
Quite a regular
Posts: 275
Since: 2006/12/9
#8

mysql_error - help with mysql query code in xoops

Hi

How do i correct this code below using XOOPS standard ?
what do i replace the mysql error with

sorry im a newbie in coding

$employee_id $xoopsDB->escape($_GET['id']);
$check$xoopsDB->query("SELECT * FROM ".$xoopsDB->prefix("employee")." WHERE id='$employee_id' ") or die(mysql_error());


mjoel

Quite a regular
Posted on: 2017/3/10 5:37
mjoel
mjoel (Show more)
Quite a regular
Posts: 275
Since: 2006/12/9
#9

Re: TDMDownloads 1.65 RC 1

bump

how do i solved the problem above ?


mjoel

Quite a regular
Posted on: 2017/3/3 1:47
mjoel
mjoel (Show more)
Quite a regular
Posts: 275
Since: 2006/12/9
#10

Re: Bulk user registration with xoops 2.5.8.1

Thank you very much sir...it works perfectly

it will be more complete if it will check in the current db to prevent same username and email


<?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);



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