1
-FireHorse-
Re: Upgrade from Xoops 2.2.3final edition to 2.4.x

Hi Mamba

Thanks for the quick reply, update worked, few bugs with some older modules, possibly theme related. Not sure if I will attempt this on the live site any time soon but at least I know the upgrade path works

many thanks
FireHorse



2
-FireHorse-
Re: Upgrade from Xoops 2.2.3final edition to 2.4.x

Bump...


Same situation here, have 2.2.3 final, looking to upgrade to 2.4.4 and the install package seems to skip this version

upd-2.0.18-to-2.3.0

Any hints people?

cheers
FireHorse



3
-FireHorse-
Re: PM On Join

sorry to resurect an old post but it seemd appropriate, how would I get php to add uid data to an ini file another ap to access eg

[uid]
barry=33

cheers
FireHorse



4
-FireHorse-
Accessing Profile fields

Sorry if this sounds like a silly question as I am very new to php and am struggling understanding the basics. I am running 2.2.3 and have made a very basic chat module but I need to access a custom field called user_gender under prefix_user_profile and I cant seem to work it out

I have tried a few things, hopefully this code snippet will show what I am trying to achieve.

<?php
include("../../mainfile.php");
include (
$xoopsConfig['root_path']."header.php");

global 
$xoopsUser$yourGender$ProMode;

if(
$xoopsUser){
    
$thisUser $xoopsUser->uname();
} else {
    
$thisUser "Guest_null";
}
if ( 
file_exists("./language/".$xoopsConfig['language']."/index.php") ) {
    
$ircmotorlng $xoopsConfig['language'];
} else {
    
$ircmotorlng english;
}
if (
$xoopsUser) {
        
$yourGender $xoopsprofile->getVar("user_gender");
}


if(
$YourGender == male) {
        
$ProMode PROFILMODE1;
} elseif (
$yourGender == female) {
        
$ProMode PROFILMODE2;
} else {
        
$ProMode PROFILMODE0;
}


can anyone point out where I am going wrong and what I need to change to fetch user_gender as a variable for use in this page?

many thanks
FireHorse



5
-FireHorse-
Re: New members List Block

Bump

Anyone know how I can change this join date format?

I am surprised no one has commented about this, it really does occupy unnecessary space in the nav bar

cheers
FireHorse



6
-FireHorse-
Re: Profile from uname instead of uid

can anyone tell me why this wont work?

$uid mysql_query("SELECT uid FROM ******_users WHERE uname = '$uname'");
include 
XOOPS_ROOT_PATH.'userinfo.php?uid='.$uid;


I am supplying $uname as it prints ok

help?



7
-FireHorse-
Re: New members List Block

Is there an easy way to change the date format from say 2006/02/26 to 26/02/06 as this is stretching the width of my nav panel.

I tried changing the time() to date("d-m-y") but no luck, i think it is controlled by formattimestamp but cant find where to change it. Using XOOPS 2.2.4

cheers
FireHorse



8
-FireHorse-
Re: When choosing Notifications I get "No valid security token found in session"

I have this problem when people register, not sure about notifications as I have them all turned off. The solution I found is to get users to add your site to allowed cookies

Control Panel
Internet Options
Privacy Tab
Edit Button

In the "Address of Website" field type in the following address yourdomain.com then select the allow button

this may not solve anyones problems but my give someone an idea perhaps, sorry i cant be of more help

FireHorse



9
-FireHorse-
Profile from uname instead of uid

I have made a chat module and are trying to get view profiles working from within the chat.

In the XOOPS main dir I have a userprofile.php that I want to call userinfo.php from, the chat server passes $user so I think all I have to do is fetch the UID from $user and append it to the userinfo.php. Sorry I am very new to php so this is probably much simpler than it looks

I have this code but its not working

<?
include(
"mainfile.php");
include (
$xoopsConfig['root_path']."header.php");
if(
$xoopsuser)
{
$sql mysql_query("SELECT uid FROM 1****y_users WHERE uname = '$user'");
$row mysql_fetch_array($sql);
$num mysql_num_rows($sql);
$uid intval($_GET['uid']);
if(
$uid <= 0)
{
print(
"Cant find a profile for $user");
include_once(
XOOPS_ROOT_PATH.'/footer.php');
exit;
}

print(
"
<table width=500>"
);

if(
$row[uid])
{
include 
XOOPS_ROOT_PATH.'modules/profile/userinfo.php?uid='.$row['uid'];
print(
"<tr><td colspan=10 class='content'>$row[uid]</td></tr>");
}
print(
"</table>");
}
else
{
print(
"No username selected! ");
}
include_once(
XOOPS_ROOT_PATH.'/footer.php');
?>


EDIT: An easier way might be to modify the userinfo.php in XOOPS dir to resolve profile from uname rather than uid, anyone know an easy way to do this?

cheers
FireHorse



10
-FireHorse-
Re: Who's Online Timeout

Thanks Hervet, just what I was looking for.

I find it a bit odd that this sort of setting is left to chance

global $xoopsUser$xoopsModule;
    
$online_handler =& xoops_gethandler('online');
    
mt_srand((double)microtime()*1000000);
    
// set gc probabillity to 10% for now..
    
if (mt_rand(1100) < 11) {
        
$online_handler->gc(300);
    }


Being quite new to php I cant fathom if we can turn this into a time based system easily. sometimes I have many hits per hour and other I have none so this setup is a little too hit and miss for my liking, most visitors are coming to be involved in an event so right when I need the online stats to stay is most likly exactly when they wont.

would increasing the number in the microtime affect the random nature at all?

cheers
FireHorse




TopTop
(1) 2 »



Login

Who's Online

229 user(s) are online (161 user(s) are browsing Support Forums)


Members: 0


Guests: 229


more...

Donat-O-Meter

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

Latest GitHub Commits