11
blueteen
Re: How can I display all the members of my Xoops Site?
  • 2008/12/16 16:32

  • blueteen

  • Quite a regular

  • Posts: 379

  • Since: 2004/7/16


Hello, you can try this :
https://xoops.org/modules/repository/singlefile.php?cid=101&lid=1776

in /modules/xoopsmembers/index.php

Replace the line 29
$op "form";

With:
$op "submit";



12
blueteen
Re: Xoops 2.3 User Profile & Yogurt 3.3
  • 2008/12/16 12:47

  • blueteen

  • Quite a regular

  • Posts: 379

  • Since: 2004/7/16


A small change made:

With this code :
$profile_handler =& xoops_getmodulehandler('profile','profile');
$profile $profile_handler->get($xoopsUser->getVar('uid'));
$date_birthday date('d/m/Y'$profile->getVar('date_birthday'));
$xoopsTpl->assign('date_birthday',$date_birthday);


The result is always linked to the connected member.
If someone tries to see another profile, he'll always see its own birthday date !

You must change this code, with :
$profile_handler =& xoops_getmodulehandler('profile','profile');
$uidyogurt intval($_GET['uid']); //get uid from url
if ($uidyogurt <= 0) { //if no valid uid passed to url
    
if (is_object($xoopsUser))  {//if member
        
$profile $profile_handler->get($xoopsUser->getVar('uid'));} //get uid for the connected member
        
else {
             
header('location: ' XOOPS_URL); //back to homepage - redirect wherever you want
             
exit();}
}
else {
//if a correct uid passed to url - eg. : index.php?uid=12
    
$profile $profile_handler->get($uidyogurt);}//get uid passed to url to take right data from profile
$date_birthday date('d/m/Y'$profile->getVar('date_birthday'));
$xoopsTpl->assign('date_birthday',$date_birthday);


French version here.

Thank to bendenice for having reported this bug.



13
blueteen
Re: Xoops 2.3 User Profile & Yogurt 3.3
  • 2008/12/12 14:55

  • blueteen

  • Quite a regular

  • Posts: 379

  • Since: 2004/7/16


Thank you, updated



14
blueteen
Re: Xoops 2.3 User Profile & Yogurt 3.3
  • 2008/12/12 14:39

  • blueteen

  • Quite a regular

  • Posts: 379

  • Since: 2004/7/16


Thanks to Ghia's post and jimmyx's post above, i can suggest you a solution.
In french here.

And the translation :

So, I suggest a first test with the addition of a field (date_birthday) in the 'profile' module, and displaying this date into 'yogurt' module.

I first created a field (date format) in the module 'profile' (under XOOPS 2.3.x, profil 1.51 and yogurt 3.3).
The label is 'Date of birth', and the name of the field in the database will be 'date_birthday'.

Resized Image

Resized Image

Resized Image

Then I edit my profile in module 'profile', and I set a date of birth.
I found this date in my profile.

Resized Image

edit /modules/yogurt/index.php
And juste before the line :
include("../../footer.php");

Add :
$profile_handler =& xoops_getmodulehandler('profile','profile');
$profile $profile_handler->get($xoopsUser->getVar('uid'));
$date_birthday date('d/m/Y'$profile->getVar('date_birthday'));
$xoopsTpl->assign('date_birthday',$date_birthday);

As this date is stored as an integer, I use the php function 'date' to change the format.

I can now use the smarty variable :
<{$date_birthday}>


That's what I do with the file /modules/yogurt/templates/yogurt/index.html, changing the line 105:
<class="odd"><img src="images/username.gif" /><span class="yogurt-profileinfo-label"><{$lang_uname}>:</span><span class="yogurt-profileinfo-value"><{$user_uname}></span></p>

With :
<class="odd"><img src="images/username.gif" /><span class="yogurt-profileinfo-label"><{$lang_uname}>:</span><span class="yogurt-profileinfo-value"><{$user_uname}> - <{$date_birthday}></span></p>

Wich displays :

Resized Image

I can use this variable everywhere in the template.

In case of text variable, you can use this simple code :
$my_variable $profile->getVar('my_text_variable');
$xoopsTpl->assign('my_text_variable',$my_variable);

Instead of :
$date_birthday date('d/m/Y'$profile->getVar('date_birthday'));
$xoopsTpl->assign('date_birthday',$date_birthday);


I can the display this variable where I want with
<{$my_text_variable}>



15
blueteen
Re: how to add a BLOCK to a an existing module
  • 2008/12/4 19:10

  • blueteen

  • Quite a regular

  • Posts: 379

  • Since: 2004/7/16


Quote:

ziwman wrote:
ps : excuse my bad english, i come from French XOOPS Community ... frxoops.org becomes really so bad and commercial ..

Really ? Tell us more...
And you're talking about 'commercial' approach ???http://www.hillow.net - 99% of adverts...
3 posts on frxoops during all year 2008, and you come here to complain...



16
blueteen
Re: Xoops 2.0.18.2 and multimenu 1.9
  • 2008/11/5 9:23

  • blueteen

  • Quite a regular

  • Posts: 379

  • Since: 2004/7/16


Solved.
Only a mistake with the type of menu.
Resized Image



17
blueteen
Re: Allowed memory size of 16777216 bytes exhausted
  • 2008/7/16 7:50

  • blueteen

  • Quite a regular

  • Posts: 379

  • Since: 2004/7/16


Hello,
The change to the memory limit with a htaccess file is not authorized by all hosts.
Can you detail what you want to do exactly ? (database transfer ? else ?)



18
blueteen
Re: Can I do this......?
  • 2008/5/15 18:32

  • blueteen

  • Quite a regular

  • Posts: 379

  • Since: 2004/7/16


Maybe placing the form into an iframe in your page ? (I'm not sure to understand well your need)



19
blueteen
Re: Formulaire = NoPerm ... can you help?
  • 2008/5/15 17:54

  • blueteen

  • Quite a regular

  • Posts: 379

  • Since: 2004/7/16


Hello,
https://xoops.org/modules/newbb/viewtopic.php?post_id=283434#forumpost283434



20
blueteen
Re: how can i set the permissions for a custom html page ?
  • 2008/5/2 7:20

  • blueteen

  • Quite a regular

  • Posts: 379

  • Since: 2004/7/16


Hello,
here's what i use :

<?php
include './mainfile.php';
include 
XOOPS_ROOT_PATH.'/header.php';
include 
XOOPS_ROOT_PATH."/include/cp_functions.php";

global 
$xoopsDB$xoopsConfig;
if (
is_object($xoopsUser)){
$groupsok $xoopsUser->getGroups();
}
else {
$groupsok=99; }

if (!
in_array("4"$groupsok)) //if not in dealer group
    
{
    
redirect_header("./index.php",2"Sorry, you're not authorized.....");
    exit();
    }
?>




TopTop
« 1 (2) 3 4 5 ... 33 »



Login

Who's Online

98 user(s) are online (85 user(s) are browsing Support Forums)


Members: 0


Guests: 98


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