31
jordi_rc
General procedure to add new fields to user profile
  • 2006/11/20 10:57

  • jordi_rc

  • Not too shy to talk

  • Posts: 114

  • Since: 2006/8/21


Hello!

I am trying to add 2 fields to user profile.
I tried to do as m0nty did with his photo hack, modifying some files.
I didn't modified all the files that m0nty did, as I only want my hack to insert 2 new fields, with no special functions associated.

I found the files to modify are these:

To add a new field to user profile:
----
Quote:


root/edituser.php
root/userinfo.php
root/register.php

root/include/registerform.php

root/kernel/user.php

root/language/english/user.php
root/language/english/global.php

root/modules/system/templates/system_userinfo.html



------------------------

To make possible modify these fields form admin panel:
----
Quote:


root/modules/system/admin/users/main.php
root/modules/system/admin/users/users.php
root/modules/system/admin/users/userform.php
root/modules/system/language/english/admin/users.php




But I did some mistake, possibly at kernel/user.php and the hack didn't work.

The fields are 2: credits (a number) and avatar3d (an url).
I added them to my xoops_users table.

I have 2 questions:

1) How to add these fields properly, specially at kernel/user.php ?

2) Have I forgotten to modify some important file ?

Please m0nty or anyone help me with this, let's see if we could find a general way to hack and have extra fields added.

Jordi.
"Battles are fought by those with the courage to believe. They are won by those who find the heart to share." -MANOWAR



32
jordi_rc
Re: Buddyfriends module vs directfriends
  • 2006/11/17 6:19

  • jordi_rc

  • Not too shy to talk

  • Posts: 114

  • Since: 2006/8/21


http://usuarios.lycos.es/ancientgames/xoops/buddyfriends24.zip

This is the temporary place where to download the bugfixed Buddyfriends until I find the author or post it to XOOPS dev.

Jordi
"Battles are fought by those with the courage to believe. They are won by those who find the heart to share." -MANOWAR



33
jordi_rc
Re: hack to post the groups
  • 2006/11/15 22:24

  • jordi_rc

  • Not too shy to talk

  • Posts: 114

  • Since: 2006/8/21


I am happy you liked and it works for you.

I also posted this to the hacks forum.

Au revoir

Jordi
"Battles are fought by those with the courage to believe. They are won by those who find the heart to share." -MANOWAR



34
jordi_rc
Show the groups of the user in profile
  • 2006/11/15 10:56

  • jordi_rc

  • Not too shy to talk

  • Posts: 114

  • Since: 2006/8/21


Hello to all.

I have added the groups of the user to the userinfo, so they are displayed in his/her profile.
It is nice for projects like mine, that all members (not only the admin) need to know when a member is part of a special group.

I developed this hack from a post of bluescreen, who did something similar to point 2, but for another purpose. Sorry I can't find that post.

The hack is this way:

1) in the file /language/english/user.php add this line:

Quote:


// hack jordi user groups displaying
define('_US_GRUPOS','Community Status');
// end of hack jordi




----------------------------------
2) In the file userinfo.php look where it says this:

Quote:


if ( is_object($xoopsUser) && $isAdmin ) {

$xoopsTpl->assign('lang_editprofile', _US_EDITPROFILE);

$xoopsTpl->assign('lang_deleteaccount', _US_DELACCOUNT);

$xoopsTpl->assign('user_uid', $thisUser->getVar('uid'));

}



and add this after it:

Quote:


// hack display user groups

$verGrupos = $thisUser->getGroups();
$susGrupos='';

//group number 1 is allways admin
if ( in_array("1", $verGrupos) ) { $susGrupos = 'Administrator'; }

//group 4 is a group you may have created
// remove this line if you didn't
// you can also add more lines, checking numbers from 4 to X
// for the groups you created

elseif ( in_array("4", $verGrupos) ) { $susGrupos .= 'A group you created'; }
//group 2 is the registered users. All people belong to this group if they are registered.
elseif ( in_array("2", $verGrupos) ) { $susGrupos .= 'Proud Member'; }

// this asigns values to variables in system_userinfo

$xoopsTpl->assign('lang_grupos', _US_GRUPOS);
$xoopsTpl->assign('user_grupos', $susGrupos);

// fin hack mostrar grupos



-------------------------------------------
3) Finally go to modules/system/templates/system_userinfo.html where it says:

Quote:


<tr valign="top">

<td class="head" width="25%"><{$lang_avatar}></td>
<td align="center" class="even"><img src="<{$user_avatarurl}>" alt="Avatar" /></td>

</tr>



And add this after it:

Quote:


<!-- jordi: hack user groups display -->
<tr>
<td class="head" width="25%"><{$lang_grupos}></td>
<td class="odd"><{$user_grupos}></td>
</tr>
<!-- jordi: end of hack user groups display -->




Now you got it!
You don't need to create any database or nothing, just do these 3 steps.

Jordi.
"Battles are fought by those with the courage to believe. They are won by those who find the heart to share." -MANOWAR



35
jordi_rc
Re: hack to post the groups
  • 2006/11/14 22:33

  • jordi_rc

  • Not too shy to talk

  • Posts: 114

  • Since: 2006/8/21


Hello daviddu54.

I have added the groups of the user to the userinfo.
The hack is this way:

1) in the file /language/english/user.php add this line:

Quote:

// hack jordi user groups displaying
define('_US_GRUPOS','Community Status');
// end of hack jordi



----------------------------------
2) In the file userinfo.php look where it says this:

Quote:

if ( is_object($xoopsUser) && $isAdmin ) {

$xoopsTpl->assign('lang_editprofile', _US_EDITPROFILE);

$xoopsTpl->assign('lang_deleteaccount', _US_DELACCOUNT);

$xoopsTpl->assign('user_uid', $thisUser->getVar('uid'));

}


and add this after it:

Quote:


// hack display user groups

$verGrupos = $thisUser->getGroups();
$susGrupos='';

//group number 1 is allways admin
if ( in_array("1", $verGrupos) ) { $susGrupos = 'Administrator'; }

//group 4 is a group you may have created
// remove this line if you didn't
// you can also add more lines, checking numbers from 4 to X
// for the groups you created

elseif ( in_array("4", $verGrupos) ) { $susGrupos .= 'A group you created'; }
//group 2 is the registered users. All people belong to this group if they are registered.
elseif ( in_array("2", $verGrupos) ) { $susGrupos .= 'Proud Member'; }

// this asigns values to variables in system_userinfo

$xoopsTpl->assign('lang_grupos', _US_GRUPOS);
$xoopsTpl->assign('user_grupos', $susGrupos);

// fin hack mostrar grupos



-------------------------------------------
3) Finally go to modules/system/templates/system_userinfo.html where it says:

Quote:

<tr valign="top">

<td class="head" width="25%"><{$lang_avatar}></td>

<td align="center" class="even"><img src="<{$user_avatarurl}>" alt="Avatar" /></td>

</tr>


And add this after it:

Quote:

<!-- jordi: hack user groups display -->
<tr>
<td class="head" width="25%"><{$lang_grupos}></td>
<td class="odd"><{$user_grupos}></td>
</tr>

<!-- jordi: end of hack user groups display -->



Now you got it!
You don't need to create any database or nothing, just do these 3 steps.

I give this hack to all people to adapt this their way, it's GPL!

By the way daviddu54 thanks for your hack of user votes!


Jordi.
"Battles are fought by those with the courage to believe. They are won by those who find the heart to share." -MANOWAR



36
jordi_rc
Re: Random Member ... ?
  • 2006/10/31 6:16

  • jordi_rc

  • Not too shy to talk

  • Posts: 114

  • Since: 2006/8/21


What is an inactive member? Why do you want to hide them?

Jordi
"Battles are fought by those with the courage to believe. They are won by those who find the heart to share." -MANOWAR



37
jordi_rc
Re: Adding users vote + user visit counter in your members profils
  • 2006/10/25 5:19

  • jordi_rc

  • Not too shy to talk

  • Posts: 114

  • Since: 2006/8/21


Hi daviddu54

I saw that if I include this line

Quote:

$xoopsTpl->assign('user_uid', $thisUser->getVar('uid'));


before the hack in userinfo it works all ok.

All is right now and working.
Thanks.

Jordi
"Battles are fought by those with the courage to believe. They are won by those who find the heart to share." -MANOWAR



38
jordi_rc
Re: Adding users vote + user visit counter in your members profils
  • 2006/10/23 13:29

  • jordi_rc

  • Not too shy to talk

  • Posts: 114

  • Since: 2006/8/21


It is ok to add this line? Am I right?
If you don't answer I think it is ok.

You should add this line to the hack at least for XOOPS 2.0.15

Jordi
"Battles are fought by those with the courage to believe. They are won by those who find the heart to share." -MANOWAR



39
jordi_rc
Re: Adding users vote + user visit counter in your members profils
  • 2006/10/22 17:38

  • jordi_rc

  • Not too shy to talk

  • Posts: 114

  • Since: 2006/8/21


Hi all Xoopies

I think I fixed it.

There is a line that is included in userinfo.php if one is admin and user:

Quote:

$xoopsTpl->assign('user_uid', $thisUser->getVar('uid'));


What does this line mean? I think it is included if one is admin because stores the uid of the member that is being seen in profile,in order to modify something. In this case it is the member rating and vote.

AM I RIGHT OR THIS IS DANGEROUS?

This must be included in order to get all members to vote. If I don't do so, uid of member voted is not posted to function.

Also in addition not only 'id' must be between '', seems that I must put all variables in line 75 between '' to work well.

Strange but works.

Jordi.
"Battles are fought by those with the courage to believe. They are won by those who find the heart to share." -MANOWAR



40
jordi_rc
Re: Adding users vote + user visit counter in your members profils
  • 2006/10/22 9:27

  • jordi_rc

  • Not too shy to talk

  • Posts: 114

  • Since: 2006/8/21


Greetings!


I think it would be easier to get help from you if I paste all my userinfo.php here. As you can see, it comes with the great hack userphoto by m0nty, highly recommended.

Quote:

<?php
// $Id: userinfo.php 2 2005-11-02 18:23:29Z skalpa $
// ------------------------------------------------------------------------ //
// XOOPS - PHP Content Management System //
// Copyright (c) 2000 XOOPS.org //
// <https://xoops.org/> //
// ------------------------------------------------------------------------ //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation; either version 2 of the License, or //
// (at your option) any later version. //
// //
// 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. See the //
// GNU General Public License for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program; if not, write to the Free Software //
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
// ------------------------------------------------------------------------ //

$xoopsOption['pagetype'] = 'user';
include 'mainfile.php';
include_once XOOPS_ROOT_PATH.'/class/module.textsanitizer.php';

include_once XOOPS_ROOT_PATH . '/modules/system/constants.php';

$uid = intval($_GET['uid']);
if ($uid <= 0) {
redirect_header('index.php', 3, _US_SELECTNG);
exit();
}

//hack compteur de visite du profil
$page = !empty($_GET['page']) ? trim($_GET['page']) : '';
if ($page != '') {
$page = $_GET['page'];
} else {
$xoopsDB->queryF("update ".$xoopsDB->prefix("users")." set hits=hits+1 where uid=$uid ");
}
//fin du hack

$gperm_handler = & xoops_gethandler( 'groupperm' );
$groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS;

$isAdmin = $gperm_handler->checkRight( 'system_admin', XOOPS_SYSTEM_USER, $groups); // isadmin is true if user has 'edit users' admin rights

if (is_object($xoopsUser)) {
if ($uid == $xoopsUser->getVar('uid')) {
$config_handler =& xoops_gethandler('config');
$xoopsConfigUser =& $config_handler->getConfigsByCat(XOOPS_CONF_USER);
$xoopsOption['template_main'] = 'system_userinfo.html';
include XOOPS_ROOT_PATH.'/header.php';
$xoopsTpl->assign('user_ownpage', true);
$xoopsTpl->assign('lang_editprofile', _US_EDITPROFILE);
$xoopsTpl->assign('lang_avatar', _US_AVATAR);
// hack votos usuarios
$thisUser =& $xoopsUser;
$xoopsTpl->assign('lang_ratethisuser', _US_RATETHISUSER);
$xoopsTpl->assign('lang_votes', _US_VOTES);
$xoopsTpl->assign('user_votes', $thisUser->getVar('votes'));
$xoopsTpl->assign('lang_hits', _US_HITSC);
$xoopsTpl->assign('user_hits', $thisUser->getVar('hits'));
$rating = $thisUser->getVar("rating");
if (!empty($rating)) {
$xoopsTpl->assign('user_rating', number_format($rating, 2));
}
$xoopsTpl->assign('lang_ratingc', _US_RATINGC);
// fin hack
$xoopsTpl->assign('lang_inbox', _US_INBOX);
$xoopsTpl->assign('lang_photo', _US_PHOTO); // added by m0nty for photo hack
$xoopsTpl->assign('lang_logout', _US_LOGOUT);
if ($xoopsConfigUser['self_delete'] == 1) {
$xoopsTpl->assign('user_candelete', true);
$xoopsTpl->assign('lang_deleteaccount', _US_DELACCOUNT);
} else {
$xoopsTpl->assign('user_candelete', false);
}
$thisUser =& $xoopsUser;
// hack user rating

$xoopsTpl->assign('lang_ratethisuser', _US_RATETHISUSER);
$xoopsTpl->assign('lang_votes', _US_VOTES);
$xoopsTpl->assign('user_votes', $thisUser->getVar('votes'));
$xoopsTpl->assign('lang_hits', _US_HITSC);
$xoopsTpl->assign('user_hits', $thisUser->getVar('hits'));
$rating = $thisUser->getVar("rating");
if (!empty($rating)) {
$xoopsTpl->assign('user_rating', number_format($rating, 2));
}
$xoopsTpl->assign('lang_ratingc', _US_RATINGC);
// fin hack
} else {
$member_handler =& xoops_gethandler('member');
$thisUser =& $member_handler->getUser($uid);
if (!is_object($thisUser) || !$thisUser->isActive() ) {
redirect_header("index.php",3,_US_SELECTNG);
exit();
}
$xoopsOption['template_main'] = 'system_userinfo.html';
include XOOPS_ROOT_PATH.'/header.php';
$xoopsTpl->assign('user_ownpage', false);

}
} else {
$member_handler =& xoops_gethandler('member');
$thisUser =& $member_handler->getUser($uid);
if (!is_object($thisUser) || !$thisUser->isActive()) {
redirect_header("index.php",3,_US_SELECTNG);
exit();
}
$xoopsOption['template_main'] = 'system_userinfo.html';
include(XOOPS_ROOT_PATH.'/header.php');
$xoopsTpl->assign('user_ownpage', false);
}
$myts =& MyTextSanitizer::getInstance();
if ( is_object($xoopsUser) && $isAdmin ) {
$xoopsTpl->assign('lang_editprofile', _US_EDITPROFILE);
$xoopsTpl->assign('lang_deleteaccount', _US_DELACCOUNT);
$xoopsTpl->assign('user_uid', $thisUser->getVar('uid'));
}
$xoopsTpl->assign('lang_allaboutuser', sprintf(_US_ALLABOUT,$thisUser->getVar('uname')));
$xoopsTpl->assign('lang_avatar', _US_AVATAR);
// hack votos usuarios
$xoopsTpl->assign('lang_ratethisuser', _US_RATETHISUSER);
$xoopsTpl->assign('lang_votes', _US_VOTES);
$xoopsTpl->assign('user_votes', $thisUser->getVar('votes'));
$xoopsTpl->assign('lang_hits', _US_HITSC);
$xoopsTpl->assign('user_hits', $thisUser->getVar('hits'));
$rating = $thisUser->getVar("rating");
if (!empty($rating)) {
$xoopsTpl->assign('user_rating', number_format($rating, 2));
}
$xoopsTpl->assign('lang_ratingc', _US_RATINGC);
// fin hack
$xoopsTpl->assign('user_avatarurl', 'uploads/'.$thisUser->getVar('user_avatar'));
$xoopsTpl->assign('lang_photo', _US_PHOTO); // added by m0nty for photo hack
$xoopsTpl->assign('user_photourl', 'uploads/'.$thisUser->getVar('user_photo')); // added by m0nty for photo hack
$xoopsTpl->assign('lang_realname', _US_REALNAME);
$xoopsTpl->assign('user_realname', $thisUser->getVar('name'));
$xoopsTpl->assign('lang_website', _US_WEBSITE);
$xoopsTpl->assign('user_websiteurl', '<a href="'.$thisUser->getVar('url', 'E').'" target="_blank">'.$thisUser->getVar('url').'</a>');
$xoopsTpl->assign('lang_email', _US_EMAIL);
$xoopsTpl->assign('lang_privmsg', _US_PM);
$xoopsTpl->assign('lang_icq', _US_ICQ);
$xoopsTpl->assign('user_icq', $thisUser->getVar('user_icq'));
$xoopsTpl->assign('lang_aim', _US_AIM);
$xoopsTpl->assign('user_aim', $thisUser->getVar('user_aim'));
$xoopsTpl->assign('lang_yim', _US_YIM);
$xoopsTpl->assign('user_yim', $thisUser->getVar('user_yim'));
$xoopsTpl->assign('lang_msnm', _US_MSNM);
$xoopsTpl->assign('user_msnm', $thisUser->getVar('user_msnm'));
// -------------- profile fields hack by m0nty ------------------
//$xoopsTpl->assign('lang_birth', _US_AGE);
//$xoopsTpl->assign('user_birth', $thisUser->getVar('user_birth'));
//$xoopsTpl->assign('user_age', CalcAge($thisUser->getVar('user_birth')));
$xoopsTpl->assign('lang_gender', _US_GENDER);
$xoopsTpl->assign('user_gender', $thisUser->getVar('user_gender'));
$xoopsTpl->assign('lang_starsign', _US_STARSIGN);
$xoopsTpl->assign('user_starsign', $thisUser->getVar('user_starsign'));
// ----------- end profile fields hack by m0nty ------------------
$xoopsTpl->assign('lang_location', _US_LOCATION);
$xoopsTpl->assign('user_location', $thisUser->getVar('user_from'));
//$xoopsTpl->assign('lang_occupation', _US_OCCUPATION);
//$xoopsTpl->assign('user_occupation', $thisUser->getVar('user_occ'));
// -------------- profile fields hack by m0nty ------------------
$xoopsTpl->assign('lang_passion', _US_PASSION);
$xoopsTpl->assign('lang_love', _US_LOVE);
$xoopsTpl->assign('user_love', $myts->makeTareaData4Show($thisUser->getVar('user_love', 'N'),0,1,1));
$xoopsTpl->assign('lang_nolove', _US_NOLOVE);
$xoopsTpl->assign('user_nolove', $myts->makeTareaData4Show($thisUser->getVar('user_nolove', 'N'),0,1,1));
$xoopsTpl->assign('lang_playlist', _US_PLAYLIST);
$xoopsTpl->assign('lang_music1', _US_CHAN1);
$xoopsTpl->assign('user_music1', $thisUser->getVar('user_music1'));
$xoopsTpl->assign('lang_music2', _US_CHAN2);
$xoopsTpl->assign('user_music2', $thisUser->getVar('user_music2'));
$xoopsTpl->assign('lang_music3', _US_CHAN3);
$xoopsTpl->assign('user_music3', $thisUser->getVar('user_music3'));
$xoopsTpl->assign('lang_music4', _US_CHAN4);
$xoopsTpl->assign('user_music4', $thisUser->getVar('user_music4'));
$xoopsTpl->assign('lang_music5', _US_CHAN5);
$xoopsTpl->assign('user_music5', $thisUser->getVar('user_music5'));
$xoopsTpl->assign('lang_filmlist', _US_FILMLIST);
$xoopsTpl->assign('lang_film1', _US_FILM1);
$xoopsTpl->assign('user_film1', $thisUser->getVar('user_film1'));
$xoopsTpl->assign('lang_film2', _US_FILM2);
$xoopsTpl->assign('user_film2', $thisUser->getVar('user_film2'));
$xoopsTpl->assign('lang_film3', _US_FILM3);
$xoopsTpl->assign('user_film3', $thisUser->getVar('user_film3'));
$xoopsTpl->assign('lang_film4', _US_FILM4);
$xoopsTpl->assign('user_film4', $thisUser->getVar('user_film4'));
$xoopsTpl->assign('lang_film5', _US_FILM5);
$xoopsTpl->assign('user_film5', $thisUser->getVar('user_film5'));
$xoopsTpl->assign('lang_extras', _US_EXTRAS);
// ----------- end profile fields hack by m0nty ------------------
$xoopsTpl->assign('lang_interest', _US_INTEREST);
$xoopsTpl->assign('user_interest', $thisUser->getVar('user_intrest'));
$xoopsTpl->assign('lang_extrainfo', _US_EXTRAINFO);
$xoopsTpl->assign('user_extrainfo', $myts->makeTareaData4Show($thisUser->getVar('bio', 'N'),0,1,1));
$xoopsTpl->assign('lang_statistics', _US_STATISTICS);
$xoopsTpl->assign('lang_membersince', _US_MEMBERSINCE);
$xoopsTpl->assign('user_joindate', formatTimestamp($thisUser->getVar('user_regdate'),'s'));
$xoopsTpl->assign('lang_rank', _US_RANK);
$xoopsTpl->assign('lang_posts', _US_POSTS);
$xoopsTpl->assign('lang_basicInfo', _US_BASICINFO);
$xoopsTpl->assign('lang_more', _US_MOREABOUT);
$xoopsTpl->assign('lang_myinfo', _US_MYINFO);
$xoopsTpl->assign('user_posts', $thisUser->getVar('posts'));
$xoopsTpl->assign('lang_lastlogin', _US_LASTLOGIN);
$xoopsTpl->assign('lang_notregistered', _US_NOTREGISTERED);

$xoopsTpl->assign('lang_signature', _US_SIGNATURE);
$xoopsTpl->assign('user_signature', $myts->makeTareaData4Show($thisUser->getVar('user_sig', 'N'),0,1,1));

if ($thisUser->getVar('user_viewemail') == 1) {
$xoopsTpl->assign('user_email', $thisUser->getVar('email', 'E'));
} else {
if (is_object($xoopsUser)) {
// All admins will be allowed to see emails, even those that are not allowed to edit users (I think it's ok like this)
if ($xoopsUserIsAdmin || ($xoopsUser->getVar("uid") == $thisUser->getVar("uid"))) {
$xoopsTpl->assign('user_email', $thisUser->getVar('email', 'E'));
} else {
$xoopsTpl->assign('user_email', '&nbsp;');
}
}
}
if (is_object($xoopsUser)) {
$xoopsTpl->assign('user_pmlink', "<a href=\"javascript:openWithSelfMain('".XOOPS_URL."/pmlite.php?send2=1&to_userid=".$thisUser->getVar('uid')."', 'pmlite', 450, 380);\"><img src=\"".XOOPS_URL."/images/icons/pm.gif\" alt=\"".sprintf(_SENDPMTO,$thisUser->getVar('uname'))."\" /></a>");
} else {
$xoopsTpl->assign('user_pmlink', '');
}
$userrank =& $thisUser->rank();
if ($userrank['image']) {
$xoopsTpl->assign('user_rankimage', '<img src="'.XOOPS_UPLOAD_URL.'/'.$userrank['image'].'" alt="" />');
}
$xoopsTpl->assign('user_ranktitle', $userrank['title']);
$date = $thisUser->getVar("last_login");
if (!empty($date)) {
$xoopsTpl->assign('user_lastlogin', formatTimestamp($date,"m"));
}


$module_handler =& xoops_gethandler('module');
$criteria = new CriteriaCompo(new Criteria('hassearch', 1));
$criteria->add(new Criteria('isactive', 1));
$mids =& array_keys($module_handler->getList($criteria));

foreach ($mids as $mid) {
// Hack by marcan : only return results of modules for which user has access permission
if ( $gperm_handler->checkRight('module_read', $mid, $groups)) {
$module =& $module_handler->get($mid);
$results =& $module->search('', '', 5, 0, $thisUser->getVar('uid'));
$count = count($results);
if (is_array($results) && $count > 0) {
for ($i = 0; $i < $count; $i++) {
if (isset($results[$i]['image']) && $results[$i]['image'] != '') {
$results[$i]['image'] = 'modules/'.$module->getVar('dirname').'/'.$results[$i]['image'];
} else {
$results[$i]['image'] = 'images/icons/posticon2.gif';
}

if (!preg_match("/^http[s]*:\/\//i", $results[$i]['link'])) {
$results[$i]['link'] = "modules/".$module->getVar('dirname')."/".$results[$i]['link'];
}

$results[$i]['title'] = $myts->makeTboxData4Show($results[$i]['title']);
$results[$i]['time'] = $results[$i]['time'] ? formatTimestamp($results[$i]['time']) : '';
}
if ($count == 5) {
$showall_link = '<a href="search.php?action=showallbyuser&mid='.$mid.'&uid='.$thisUser->getVar('uid').'">'._US_SHOWALL.'</a>';
} else {
$showall_link = '';
}
$xoopsTpl->append('modules', array('name' => $module->getVar('name'), 'results' => $results, 'showall_link' => $showall_link));
}
unset($module);
}
}
include XOOPS_ROOT_PATH.'/footer.php';
?>




That's all. Where is the error? I think I made a mistake in where I mentioned in the preceding email.



Jordi.
"Battles are fought by those with the courage to believe. They are won by those who find the heart to share." -MANOWAR




TopTop
« 1 2 3 (4) 5 6 7 ... 10 »



Login

Who's Online

148 user(s) are online (99 user(s) are browsing Support Forums)


Members: 0


Guests: 148


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